Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Questionnaire
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
@shadcn/react
@shadcn/helpers
Utilities
import { CopyChip } from "@/components/ui/copy-chip"
export function CopyChipDemo() {A host, a command, a URL — something the reader needs verbatim. The value is set in mono because it is a machine value, and the chip reports its own success: the glyph swaps to the accept mark and the ink steps to green for a moment. There is no toast and no tinted plate behind it.
Usage#
import { CopyChip } from "@/components/ui/copy-chip"<CopyChip value="npm.po5.in" />Long values#
Pass label when the value is too long to show in full. The full value is
still what reaches the clipboard.
<CopyChip value="ssh [email protected]" label="ssh deploy@…" />Without a clipboard#
navigator.clipboard needs a secure context. Where it is unavailable the chip
selects its own text instead, so the reader can copy by hand rather than being
left with a dead button.
API Reference#
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The text put on the clipboard. |
label | ReactNode | value | What is shown. |
holdFor | number | 1600 | How long the copied state holds, in ms. |
copiedLabel | string | "Copied" | Announced while the copied state holds. |
onCopied | (value: string) => void | — | Called after a successful copy. |
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel