ReScript Shadcn
Get started
  • Installation
Components
  • Accordion
  • Alert
  • AlertDialog
  • AspectRatio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • ContextMenu
  • DataTable
  • DatePicker
  • Dialog
  • Direction
  • Drawer
  • DropdownMenu
  • Empty
  • Field
  • HoverCard
  • Input
  • InputGroup
  • InputOtp
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • MessageScroller
  • NativeSelect
  • NavigationMenu
  • Pagination
  • Popover
  • Progress
  • RadioGroup
  • Resizable
  • ScrollArea
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • ToggleGroup
  • Tooltip
  • Typography

Resizable

Accessible resizable panel groups and layouts with keyboard support.

One
Two
Three

About#

The Resizable component is built on top of react-resizable-panels by bvaughn.

Installation#

npx shadcn@latest add @rescript-shadcn/Resizable

Usage#

<Resizable orientation=Horizontal>
  <Resizable.Panel> {"One"->React.string} </Resizable.Panel>
  <Resizable.Handle />
  <Resizable.Panel> {"Two"->React.string} </Resizable.Panel>
</Resizable>

Examples#

Vertical#

Use orientation="vertical" for vertical resizing.

Header
Content

Handle#

Use the withHandle prop on ResizableHandle to show a visible handle.

Sidebar
Content

API Reference#

See the react-resizable-panels documentation.

@react.component
let make = () =>
  <Resizable orientation=Horizontal className="max-w-sm rounded-lg border">
@react.component
let make = () =>
  <Resizable orientation=Vertical className="min-h-[200px] max-w-sm rounded-lg border">
@react.component
let make = () =>
  <Resizable orientation=Horizontal className="min-h-[200px] max-w-sm rounded-lg border">