Blossom UI

Resizable panels

Resizable panels component with draggable and keyboard accessible handles, size limits, horizontal and vertical layouts.

How to use it

Run npx @blossomui/react add resizable, or copy src/components/UI/Resizable/Resizable.tsx into your React project and import it.

import { ResizablePanels } from './components/ui/Resizable'

Props

ResizablePanel

PropTypeDescription
id (required)string
content (required)ReactNode
defaultSizenumberStarting size, as a percentage of the space. Panels without it share what is left.
minSizenumberSmallest size, as a percentage.
maxSizenumberLargest size, as a percentage.

ResizablePanelsProps

PropTypeDescription
panels (required)ResizablePanel[]
direction'horizontal' | 'vertical'`horizontal` puts the panels side by side, `vertical` stacks them.
onResize(sizes: number[]) => voidCalled with the size of every panel, in percentage, while the user resizes.
withHandlebooleanShow a small grip in the middle of each handle.
colorstringAccent color of the handle when it is used: any CSS color. Without it the component uses `--blossom-accent`.
handleLabelstringAccessible name of the handles.
classNamestringGive it a height, for example `h-72`. The panels fill it.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree