Buttons

Components

Component

A Button with six variants (primary, secondary, outline, ghost, destructive, link) and four sizes including a square icon size. The loading state shows a spinner without changing the button's width, keeps focus on the button and sets aria-busy. Exports buttonVariants so links can share the same styles.

Buttons · Chomodo Studio 0 likes 0 installs
Component

A copy-to-clipboard button that swaps to a check for two seconds, plus a one-line CopySnippet for commands and IDs. Uses the Clipboard API with an execCommand fallback; when both are blocked (for example in a sandboxed iframe) it selects the text and asks for Ctrl+C or ⌘C instead of failing silently, and counts the user's own copy as success. Status is announced politely.

Buttons · Chomodo Studio 0 likes 0 installs
Component

A button that runs a whole async action in place: idle, pending, success and error, without ever changing width, because every label is stacked invisibly in one grid cell. Labels crossfade upward between states and icons change with them: a ring spinner (or a determinate arc when progress is given), a check that draws itself and an X with a small shake. While pending a hairline bar runs along the bottom edge, and success briefly floods the button green before it eases back. It keeps focus throughout, is busy rather than disabled while pending, announces each state politely, and simply swaps icons when reduced motion is requested. A status prop can force any state.

Buttons · Chomodo Studio 0 likes 0 installs
Component

A pill toggle for liking, saving, starring and following, with a count that rolls. Turning it on pops the icon and throws a small burst of dots and strokes; the number rolls up or down through a two-row swap. Like fills rose, save fills amber and becomes Saved, star fills with the primary colour, and follow changes to a quieter outlined Following pill. Rapid repeat clicks settle into a single change event, and a long press (or Alt+Arrow) opens an optional tray of alternative reactions that the pill then shows. It reports its pressed state and count to screen readers, the tray is a keyboard menu that returns focus when closed, and reduced motion just switches the fill.

Buttons · Chomodo Studio 0 likes 0 installs
Component

Buttons that feel like physical keys, in three materials behind one API: raised keycaps on a darker base edge that sink when pressed, soft keys lifted out of the surface by a light and a dark shadow that turn inward on press, and inset keys carved into the panel that press deeper. Primary, neutral and destructive tones mix their shadows from theme tokens, so dark mode works. Keys can print a tiny corner legend such as a shortcut letter, and a latched mode turns any key into a toggle that rests half-pressed while on. Space and Enter show the same press as the pointer, icon keys warn in the console when they lack a label, and the sink movement is dropped under reduced motion.

Buttons · Chomodo Studio 0 likes 0 installs