This pattern supports configuration via data attributes on the root .delay-accordion element:
| Attribute | Default | Description |
|---|---|---|
data-delay-enabled |
“true” | Enable/disable auto-advance timer |
data-delay-speed |
“3000” | Duration in milliseconds before advancing |
data-progress-position |
“horizontal” | Progress bar orientation: “horizontal” or “vertical” |
data-collapse-description |
“false” | Hide tab descriptions until tab is active/expanded |
Both orientations display a var(--neutral-light) track with a var(--primary) fill that animates based on the delay speed.
When data-collapse-description="true", tab descriptions are hidden by default and only reveal when that tab is active. This creates a cleaner initial appearance showing only tab titles, with descriptions expanding on interaction.
aria-hidden attributes for accessibilityTo make these attributes configurable via the Etch UI, use props syntax:
data-delay-enabled="{props.autoAdvance}"
data-delay-speed="{props.duration}"
data-progress-position="{props.progressPosition}"
data-collapse-description="{props.collapseDescription}"
Then define autoAdvance (boolean), duration (number), progressPosition (select: horizontal/vertical), and collapseDescription (boolean) as component props.
This pattern uses container queries instead of media queries for responsive behavior. This means the layout responds to its available space, not the viewport width.
.delay-accordion__container has container-type: inline-size@container (max-width: 900px) queriesResizeObserver to track container width