Copy Command
A command line with a copy button that springs into a check, with optional tabs for each package manager.
pixikit.com/docs/components/copy-command
Customize
Reset after1500ms
Accent
Font size16px
Width520px
Props
9| Name | Type | Default | Description |
|---|---|---|---|
command | string | "npx pixikit add aurora" | The command to show and copy, when there are no tabs. |
commands | CopyCommandTab[] | None | One tab per variant of the command, e.g. one per package manager. Overrides command. |
prompt | string | "$" | The sign before the command. It is never copied. |
resetAfter | number | 1500 | How long the check and the ring stay after a copy, in milliseconds. |
accent | string | "#7c3aed" | The colour of the ring that flashes on a copy. |
onCopy | (command: string) => void | None | Called with the command after it is copied. |
fontSize | number | 16 | The text size in pixels; the box, the tabs and the button grow with it. |
width | number | 520 | The widest it gets, in pixels; it shrinks to fit a narrow container. |
className | string | None |