Components
Code
UI Library:
A component used to display inline code, with ability to copy the content by a button.
Installation
pnpm dlx shadcn@latest add @toui/code
Examples
Copy Button
Variants
Sizes
API Reference
This component provides a flexible way to display inline code snippets with optional copy functionality.
Code
| Prop | Type | Default |
|---|---|---|
variant | default | |
size | default | |
showCopyButton | false | |
copyText | ||
asChild | false | |
className |
Credits
- Built with class-variance-authority for variant management.
- Icons from Lucide React.