feat(headless): add Collapsible primitive#8764
Conversation
Adds Root, Trigger, and Panel parts. Panel exposes --collapsible-panel-height and --collapsible-panel-width CSS vars for height/width transitions, and data-cl-open, data-cl-closed, data-cl-starting-style, data-cl-ending-style attributes for animation lifecycle hooks.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Summary
Collapsible.Root,Collapsible.Trigger, andCollapsible.Panelparts following the same patterns asAccordionandDialog--collapsible-panel-heightand--collapsible-panel-widthCSS vars (measured viaResizeObserver) for CSS-driven animationsdata-cl-open,data-cl-closed,data-cl-starting-style,data-cl-ending-styleopen/onOpenChange) and uncontrolled (defaultOpen) modesdisabledprop on Root propagates to Trigger via contexthasBeenClosedguard asAccordionPanel)package.jsonandvite.config.tsunder@clerk/headless/collapsibleReview Stack
Test plan
pnpm testinpackages/headless— all 377 tests passpnpm buildinpackages/headless— dist includesprimitives/collapsible/