Component
Ink Copy Button
Press copy. Ink erupts from the button, floods the stage, pulls itself together and dries into a glossy checkmark that lands back in the button.
Move the cursor to drag the ink · press Copy
Variants
Sizes and states, all built from the same markup. Every one splashes the same stage.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page. The ink stage is one fixed canvas the script adds for you.
Accessibility
- Role and state. A real button. While the ink plays it is aria-disabled (still focusable) and a polite live region announces "Copied to clipboard".
- Keyboard. Tab to the button, Space or Enter copies and starts the splash. The focus ring uses the --ring token and the ink bloom also shows on focus.
- Reduced motion. No canvas animation: the label switches and the checkmark is drawn instantly. The copy and the announcement still happen.
- Pointer only on the button. The ink canvas never takes pointer events, so it cannot block anything under it. The ink colour follows the --primary token in every preset and theme.