- Docs
- Components
- Actions
Copy button
Copies a value. The icon turns to a check, "Copied" is announced, and focus stays.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.4
- Renders
<button>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Keyboard
| Keys | What happens |
|---|---|
| Enter | Copies. |
| Space | Copies. |
| TabTab | Moves focus to it; its tooltip opens. |
02
Behaviour
- Name
- label, or "Copy"; with a visible label, the label names it.
- Copied
- Announced politely through a status region; the tooltip says "Copied"; focus stays.
- Fails visibly
- With no clipboard access: the icon turns to an alert and "Couldn't copy" is announced.
- Resets
- Back to Copy after resetAfter, 2 seconds by default.
- Focus
- A 2px Ember ring on :focus-visible, inside a 1px surface gap.
03
Tested
On every change, before it ships.
- axe, WCAG 2.2 A and AA, in Chromium on every pull request
- Firefox and WebKit every night
- A stubbed clipboard: copied, and failed
- Hindi: its words from QeetrixProvider