Accordion expand

A disclosure panel grows from zero to its natural height while its chevron rotates, with no fixed max-height hack.

ListPress Pure CSS time-based Targets: Web · App Chrome 107+, Safari 16+, Firefox 66+

Target
Implement the "Accordion expand" effect in vanilla HTML/CSS/JS.

Context: A disclosure panel grows from zero to its natural height while its chevron rotates, with no fixed max-height hack.
Trigger: the element is pressed (pointerdown → pointerup).
Timeline: time-based (duration + easing).

Motion tokens (normal):
- grid-template-rows (panel): 0fr → 1fr
- rotate (chevron): 0deg → 180deg
- opacity (content): 0 → 1
- duration: 260ms
- easing: cubic-bezier(0.2, 0.8, 0.2, 1)
- note: height change is a layout animation by nature; keep it to one panel at a time

Motion tokens (prefers-reduced-motion):
- grid-template-rows: 0fr → 1fr instantly
- opacity (content): 0 → 1 over 150ms
- duration: 0ms

Technique: prefer pure CSS transitions/animations; use JS only to toggle classes.

Acceptance:
- animate only transform and opacity unless the spec lists other properties
- no layout shift; content is visible without the animation
- when prefers-reduced-motion is set, use the reduced tokens only
- no max-height guess; panel animates to its true content height
- button has aria-expanded and controls the panel id

Generated from the spec. Prompts differ by target name only; the tokens are the source of truth.