rt-accordion Demos

Download This Plugin Back To CSSScript.Com

A zero-dependency vanilla JS library that creates smooth, ARIA-accessible accordion components via HTML attributes alone.

No build step required

Instance A - `single` mode + `default-open=first` (rt-* attrs)

Navigation keys are active. Try ArrowUp/ArrowDown/Home/End while focused on a trigger.
This row opens on init even in single mode. Opening another row will close it.
The inline text in the trigger changes based on open state.

Instance B - `multiple` mode + `default-open=all` (data-* attrs)

Opening one item does not close siblings in this instance.
Every selector also works through `data-rt-accordion-*`.
This whole instance starts fully expanded.

Instance C - `default-open=none` + dynamic content / refresh

No row is open at startup in this configuration.
Dynamic block. Click "Append content" below.

Global API Console

Ready.