Clipboard

zyra-clipboard

A one-click copy-to-clipboard trigger with a built-in "copied" confirmation state, for API keys, code snippets, and share links.

API

All inputs and configuration options for zyra-clipboard.

PropTypeDefaultDescription
valuestring''The text copied to the clipboard
labelstring'Copy'Label shown before copying
copiedLabelstring'Copied!'Label shown briefly after a successful copy
size'sm' | 'md' | 'lg''md'Physical size of the trigger
variant'button' | 'icon''button'Icon-and-label button, or icon-only

Accessibility

Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.

  • Icon-only variant sets aria-label to the current label so the action is announced
  • The copied confirmation is visual + textual, not color-only