Buttons

Components

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