Components
← All components

Read More

stimeo--read-more

Toggles a CSS line-clamp, hiding the toggle when the text already fits.

  • Disclosure

The stimeo--read-more controller borrows the Disclosure convention (aria-expanded) to switch a paragraph between a clamped and full view via data-state. The clamp itself is the consumer's CSS; the controller adds overflow detection — when the text does not actually overflow its clamp the toggle is hidden, and the check re-runs on resize. The full text always stays in the DOM, so assistive technology reads everything regardless of state. Behavior only — styling is owned by this Playground.

running

Stimeo is a headless Stimulus UI framework for Ruby on Rails. It ships behavior only — accessible, attribute-driven components that own roles, keyboard interaction, and live-region feedback, while leaving every pixel of styling to you. There is no bundled CSS and no runtime dependency: you bring the markup and the looks, Stimeo brings the correct, tested accessibility semantics underneath.

Keyboard

KeyAction
Enter / Space Toggle between the clamped and full text (native button).