Dot Morph Button
betaA pill button led by a dot that stretches into a bar on hover and keyboard focus.
- Forms
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add dot-morph-buttonnpm packages installed: class-variance-authority.
import { DotMorphButton } from "@/components/ui/dot-morph-button";Default
Gallery
Tones
Sizes
<DotMorphButton>
| Prop | Type | Default |
|---|---|---|
tone | "current" | "primary" | "success" | "warning" | "destructive" | "info" | "primary" |
The dot is aria-hidden decoration; the button is named by its label. The morph runs on keyboard focus as well as hover, and hover only applies on devices that can hover, so a tap never leaves it stuck. Under reduced motion the change is instant.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes