Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Anatomy
  • Examples
  • Default disclosure
  • Controlled disclosure
  • Disabled state
  • Long wrapping content
  • Recommendations
  • Usage boundaries
  • API reference

Layout

Collapsible

Toggles the visibility of secondary content with animated height transitions.

idle

Usage

import {
	Collapsible,
	CollapsiblePanel,
	CollapsibleTrigger,
} from "@mizen-labs/ui";

Anatomy

The parts and how they nest, taken from the preview above.

<Collapsible>
	<CollapsibleTrigger />
	<CollapsiblePanel />
</Collapsible>

Examples

Default disclosure

Uncontrolled disclosure panel for secondary configuration details.

Controlled disclosure

Coordinates disclosure state through external state and event handlers.

Disabled state

Suppresses user interaction and preserves the closed panel state.

Long wrapping content

Preserves layout structure and text wrapping across responsive viewports.

Recommendations

GuidancePractice
Do

Name the content being revealed and keep the trigger visible after expansion.

Usage boundaries

GuidanceBoundary
Scope

Use Accordion for related disclosure sections. Do not hide required input or critical errors.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
openboolean—Controls open state of the collapsible disclosure.
defaultOpenbooleanfalseSets initial open state for uncontrolled disclosure.
onOpenChange(open: boolean, eventDetails: CollapsiblePrimitive.Root.ChangeEventDetails) => void—Callback invoked when the open state changes.
disabledbooleanfalsePrevents user interaction and suppresses disclosure toggling.
CollapsibleCollapsibleProps"div"Root disclosure container that coordinates open state with a default div host.
CollapsibleTriggerCollapsibleTriggerProps"button"Interactive trigger button with managed aria-expanded; supports render and nativeButton.
CollapsiblePanelCollapsiblePanelProps"div"Animated disclosure panel with measured transitions; supports keepMounted and hiddenUntilFound. Place spacing on an inner container.
CollapsiblePrimitivetypeof BaseCollapsible—Low-level Base UI primitive escape hatch for custom composition.
PreviousCardNextFrame
Restore window
30 days
Exports kept
90 days
Shared links
Disabled
Region
us-east-1
Worker nodes
3–12
Autoscaling
Enabled

All session activities are tracked under system security guidelines. Audit logs, access tokens, and administrative actions undergo encrypted replication across redundant storage zones and remain archived for ninety days.