docs / core / terminal
Terminal
a shell command in a row, with the copy button already there. scoped packages and urls carry the accent. anything longer than a line is CodeSnippet with bash.
intensity · recedesrsc · client
provenance
authored in usvalayer
core / primitivesintensity
recedes · safe anywhere, including dense surfacescomposition
install sections, docs, empty states that end in a commandstack a few for a sequencenot a shell. it does not execute or scrollnot for outputa11y
the prompt isaria-hidden · the copy button is labelledjest-axedependencies
CodeSnippet from the same packagelive demo · try it out
bun add usvacustomize
commandthe command, without the prompt
promptdecorative, hidden from screen readers
copyableoff for examples nobody should run
usage
import { Terminal } from "@usva-ui/react/primitives/terminal";
<Terminal command="bun add usva" />props
| prop | type | default | notes |
|---|---|---|---|
| command | string | — | just the command. what gets copied. |
| prompt | string | "$" | decorative, hidden from screen readers. |
| copyable | boolean | true | off for examples nobody should run. |
| onCopied | (value: string) => void | — | fires after a successful copy, never on a denied one. |
get it
bun add @usva-ui/reactusage
import { Terminal } from "@usva-ui/react/primitives/terminal";
<Terminal command="bun add usva" />