LobeChatLobeHub
UI
Components
Chat
Mobile
Awesome
Brand
Mdx
Color
Changelog
Ctrl K
General
ActionIcon
ActionIconGroup
Icon
FileTypeIcon
MaterialFileTypeIcon
Data Display
Avatar
Collapse
EmptyCard
FluentEmoji
Highlighter
Image
List
Markdown
Mermaid
Snippet
SortableList
Tag
Tooltip
Video
Data Entry
CodeEditor
ContextMenu
CopyButton
EditableText
EmojiPicker
Form
FormModal
Input
SearchBar
SelectWithImg
SliderWithInput
Swatches
ThemeSwitch
Feedback
Alert
Modal
Layout
DraggablePanel
Footer
Grid
Header
Layout
Navigation
Burger
SideNav
TabsNav
Toc
Theme
ConfigProvider
FontLoader
ThemeProvider

DraggablePanel

DraggablePanel is a panel that can be dragged and resized. It supports pinning, fixed or floating mode, placement in four directions, minimum width and height, expandable or not, default and customizable size, and destroy on close. It also provides a handler for expanding and collapsing the panel.

import { DraggablePanel } from '@lobehub/ui';
NPM
UNPKG
BundlePhobia
PackagePhobia
Anvaka Graph
Source
Edit
Previous
Modal
Next
Footer

Resources

Lobe UI-AIGC Components
Lobe Icon-AI / LLM Icon Collection
Lobe Charts-Modern Charts
Lobe TTS-TTS / STT Library

Community

Report Bug
Request Feature

Help

GitHub
Changelog

More Products

🤯 Lobe Chat-AI / LLM Chat Framework
🧸 Lobe Vidol-Virtual Idols for EveryOne
🅰️ Lobe Theme-Stable Diffusion Extension
🌐 Lobe i18n-AI i18next CLI
Copyright © 2022-2025
Made with 🤯 by LobeHub
LobeHub

Default

Layout

APIs

NameDescriptionTypeDefault
classNames--{content?:string;handle?:string}--
defaultExpandThe default expand state of the panelbooleantrue
defaultSizeThe default size of the panel{width?:string|number;height?:string|number}--
destroyOnCloseWhether the panel should be destroyed when closed or notbooleanfalse
expandWhether the panel is expanded or notboolean--
expandableWhether the panel is expandable or notbooleantrue
fullscreen--boolean--
handlerStyleThe style of the panel handlerCSSProperties--
hanlderStyle--{}--
headerHeight--number--
maxHeight--number--
maxWidth--number--
minHeightThe minimum height of the panelnumber--
minWidthThe minimum width of the panelnumber--
modeThe mode of the panel, fixed or float"fixed"|"float""fixed"
onExpandChangeCallback function when the expand state of the panel changes(expand:boolean)=>void--
onSizeChangeCallback function when the size of the panel changes(delta:import("/node_modules/re-resizable/lib/index").NumberSize,size?:import("/node_modules/re-resizable/lib/index").Size)=>void--
onSizeDraggingCallback function when the panel is being resized(delta:import("/node_modules/re-resizable/lib/index").NumberSize,size?:import("/node_modules/re-resizable/lib/index").Size)=>void--
pinWhether the panel can be pinned or notbooleantrue
placementThe placement of the panel, right, left, top or bottom"top"|"bottom"|"left"|"right"(required)
resizeWhether the panel can be resized or not{bottom?:boolean;bottomLeft?:boolean;bottomRight?:boolean;left?:boolean;right?:boolean;top?:boolean;topLeft?:boolean;topRight?:boolean}|booleantrue
showHandlerWhenUnexpand--boolean--
showHandlerWideAreaWhether the panel handler should be shown when unexpanded or notbooleantrue
sizeThe size of the panel{width?:string|number;height?:string|number}--
Draggable Panel
Content
Header
DraggablePanel
Footer
Content