Components / Composition
Snippet
A command or short code with a copy button.
@fabrials/ui
curl -fsSL https://fabrials.com/install/spanreed.sh | shirm https://fabrials.com/install/spanreed.ps1 | iexInstallation
Import the control from
@fabrials/ui, after setting the app up.TypeScript import { Snippet, CopyButton } from "@fabrials/ui";
API reference
| Prop / export | Type | Description |
|---|---|---|
prompt | string | Shown before each line and left out of the copy, "$" by default. |
label | string | Names the snippet. |
copyValue | string | What to copy when it differs from what is shown. |
Behavior
Long commands wrap with a hanging indent instead of scrolling.
Accessibility
Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.