Skip to content

Commit 5710f47

Browse files
committed
fix(web): skip disclosure height transitions for reduced motion
1 parent eee0557 commit 5710f47

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/ui/collapsible.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ function CollapsibleTrigger({ className, ...props }: CollapsiblePrimitive.Trigge
1919
}
2020

2121
function CollapsiblePanel({ className, ...props }: CollapsiblePrimitive.Panel.Props) {
22+
// Reuses the local shadcn/Base UI panel; skip height travel for reduced motion.
23+
// https://ui.shadcn.com/docs/components/base/collapsible
2224
return (
2325
<CollapsiblePrimitive.Panel
2426
className={cn(
25-
"h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0 data-open:data-ending-style:[height:var(--collapsible-panel-height)]",
27+
"h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 motion-reduce:transition-none data-ending-style:h-0 data-starting-style:h-0 data-open:data-ending-style:[height:var(--collapsible-panel-height)]",
2628
className,
2729
)}
2830
data-slot="collapsible-panel"

0 commit comments

Comments
 (0)