sigilUI

Clipboard

Copy a value and provide feedback when copying succeeds or fails.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Clipboard } from "@sigil-ui/components";

Usage

<Clipboard value="npx @sigil-ui/cli init" />

Copy errors are shown inline and can be retried. A custom render function receives copied, error, and copy.

Props

PropTypeDefaultDescription
valuestring——
timeoutnumber2000Time in ms before resetting to idle state.

Token integration

CSS VariablePurpose
--s-radius-smRadius sm
--s-text-mutedText muted
--s-borderBorder
--s-border-styleBorder style
--s-surfaceSurface
--s-surface-elevatedSurface elevated
--s-duration-fastDuration fast
--s-primaryPrimary