Headless CopyButton overview
Imports
Use the directive directly when you want full control of the trigger markup and styling.
Headless import
ts
import { TngCopy } from '@tailng-ui/primitives';
Quick trigger
The smallest useful setup is a native button plus tngCopy and either tngCopyText or tngCopyFrom.
Minimal copy trigger
html
<button
type="button"
tngCopy
[tngCopyText]="installCommand"
(tngCopied)="onCopied($event)"
(tngCopyError)="onCopyError($event)"
>
Copy install command
</button>
Style variants
The same primitive trigger rendered with owner-authored Plain CSS and Tailwind shells.
Plain CSS copy trigger
Tailwind copy trigger
No copy action yet.