On this page
@addTagHelper *, Webority.Ui.RazorButton form
The default copy button names what it copies, and its label can say the action in the page's own words.
Default button
Custom labels
Variants
Copy buttons take the same tone and fill as AppButton, so a copy action matches the page's colour scheme.
Fills in a row
Each tone in every fill
Sizes
Use sm in dense tables, md by default and lg where the copy action is the main thing on the screen.
Small, medium and large
Icon-only form
An icon-only copy button suits a row or code block, and keeps its label as the accessible name.
Icon-only copy button
Every option
Every value of every prop, one cell each.
tone: all six
tone="primary" (default)
tone="success"
tone="warning"
tone="danger"
tone="info"
tone="neutral"
variant: all six
variant="solid"
variant="soft"
variant="outline"
variant="ghost" (default)
variant="link"
variant="glass"
size: button form
size="sm"
size="md" (default)
size="lg"
iconOnly
icon-only="false" (default)icon-only="true"icon-only="true" size="lg"text
text="https://invite.example.com/abc123"labels & className
custom label + copied-labelclass="analytics-copy"onCopied
onCopied={fn} (React only) runs after a successful copytooltip
tooltip not set (default)tooltip="Copy this key"tooltipPlacement
tooltip-placement="auto" (default)
tooltip-placement="top"
tooltip-placement="bottom"
tooltip-placement="start"
tooltip-placement="end"
Guidance
What to do, and what to avoid.
Use it when
- A user needs to copy an API key, token, ID, link, or other reference to the clipboard.
- You want visual feedback: the icon and label swap for 2 seconds to confirm the copy.
- The copied text is sensitive (token, key) and you want a compact, accessible button.
Reach for something else when
- You are copying large amounts of data or structured content. → A download link or a manual selection + native copy.
- The text to copy changes dynamically and you cannot react to it. → A static link or a form with a dedicated copy action.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
9 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| textdefault required | string | required | The text to copy. |
| labeldefault Copy | string | Copy | Button label. |
| sizedefault md | sm | md | lg | md | Button size. |
| tonedefault primary | primary | success | warning | danger | info | neutral | primary | Semantic colour. |
| variantdefault ghost | solid | soft | outline | ghost | link | glass | ghost | Button variant. |
Less common 4 props
| Prop | Type | Default | Description |
|---|---|---|---|
| copied-labeldefault Copied | string | Copied | Label shown after a successful copy. |
| icon-onlydefault false | bool | false | Render as an icon-only button (like AppActionIcon); label becomes aria-label. |
| tooltipdefault - | string | - | A collision-aware hover and focus tooltip (via AppTooltip) that flips to stay on screen. |
| tooltip-placementdefault auto | auto | top | bottom | start | end | auto | Preferred tooltip side; auto picks the side with the most room. |
Screen reader
3 notes- In the button form the label swaps from the Copy label to the Copied label, and the button has aria-live polite so the change is announced.
- In the icon-only form the current label is the accessible name of the action icon.
- A clipboard that denies the copy changes nothing and raises no error.