saturation/uisaturation/ui
DocsComponentsBlocksPages
GitHub

Sections

IntroductionComponentsInstallationMCPTheming

Components

ComponentsAccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBeamBlur FadeBorder TrailBreadcrumbButtonButton GroupCalendar PickerCardChartCheckboxCollapsibleComboboxCommandComparison SliderContext MenuCredit CardData TableDate PickerDialogDropdown MenuEmoji PickerEmptyFieldFiltersFull CalendarGlow EffectInputInput GroupInput OTPItemKanbanKbdMenubarNavigation MenuNovel EditorPaginationParallaxProgressProgressive BlurRadio GroupRippleSelectSeparatorSheetSkeletonSliderSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Docs/Components/Collapsible

Collapsible

An expandable content container that can be toggled open or closed.

Loading...

Installation

pnpm dlx shadcn@latest add https://ui.saturation.io/r/collapsible.json

Tailwind v4 — Source Scanning

Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/components/ui/collapsible"
<Collapsible>
  <CollapsibleTrigger>Toggle</CollapsibleTrigger>
  <CollapsibleContent>
    Content here...
  </CollapsibleContent>
</Collapsible>

Examples

Controlled

Loading...
Controlled open state.

File Tree

Loading...
Nested file tree.

API Reference

PropTypeDefaultDescription
openboolean—The controlled open state.
defaultOpenboolean—The default open state.
onOpenChange(open: boolean) => void—Event handler for open state changes.
PreviousCode BlockNextCombobox

On This Page

  • Installation
  • Usage
  • Examples
  • Controlled
  • File Tree
  • API Reference

@peduarte starred 3 repositories

@radix-ui/primitives

State: Closed