Blossom UI

Collapsible

Collapsible component, one section that opens and closes with a smooth height animation, with icon, description, controlled state and a plain variant.

How to use it

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

import { Collapsible } from './components/ui/Collapsible'

Props

CollapsibleProps

PropTypeDescription
title (required)ReactNodeWhat the user presses to open or close the content.
descriptionReactNodeSmall text under the title.
iconReactNodeElement shown before the title, for example an icon.
children (required)ReactNode
openbooleanControlled state. Use together with `onOpenChange`.
defaultOpenbooleanInitial state when the component is not controlled.
onOpenChange(open: boolean) => void
variant'plain' | 'bordered'`plain` has no frame, `bordered` draws a card around it.
colorstringAccent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default.
disabledboolean
classNamestring

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