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 usva

layer

core / primitives

intensity

recedes · safe anywhere, including dense surfaces

composition

install sections, docs, empty states that end in a commandstack a few for a sequencenot a shell. it does not execute or scrollnot for output

a11y

the prompt is aria-hidden · the copy button is labelledjest-axe

dependencies

CodeSnippet from the same package
live demo · try it out
bun add usvacopy
customize
commandthe command, without the prompt
promptdecorative, hidden from screen readers
copyableoff for examples nobody should run
usagecopy
import { Terminal } from "@usva-ui/react/primitives/terminal";

<Terminal command="bun add usva" />

props

proptypedefaultnotes
commandstringjust the command. what gets copied.
promptstring"$"decorative, hidden from screen readers.
copyablebooleantrueoff for examples nobody should run.
onCopied(value: string) => voidfires after a successful copy, never on a denied one.

get it

bun add @usva-ui/reactcopy
usagecopy
import { Terminal } from "@usva-ui/react/primitives/terminal";

<Terminal command="bun add usva" />