Bookmark Ribbon

Motion Components · Vol. 1

Component

Bookmark Ribbon

Variants

Sizes and states, all built from the same markup.

Small
Default
Disabled

Usage

Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.

Accessibility

  • Role and state. A native button with aria-pressed (a toggle button, as in Radix Toggle). The accessible name flips between "Save article" and "Remove from saved"; a polite live region announces the change.
  • Keyboard. Tab to focus, Space or Enter toggles. The focus ring is drawn around the 44px hit area using the --ring token.
  • Reduced motion. With prefers-reduced-motion the ribbon jumps to its full length with no sway or overshoot. Saved state stays obvious from the ribbon and the icon.
  • Touch and contrast. The whole ribbon is the target, never smaller than 44px wide. Colours come from tokens, so AA contrast holds in every preset and in dark mode.