LayoutUpdated May 3, 2026

CopyButton

A small button that copies text and announces copied state visually.

#Default usage

Copy buttonCopied state resets after a short delay.

#Usage

Code
import { CopyButton } from "@froggdesign/enter-ui";

export function Example() {
  return (
    <CopyButton text="pnpm install @froggdesign/enter-ui @froggdesign/theme" />
  );
}

#Patterns

Custom labelsUse short labels for dense toolbars.

#Accessibility

CopyButton updates its aria label between the default and copied state. Clipboard access happens on user click.

#API

  • text is required.
  • label, copiedLabel, and resetDelay customize behavior.
  • Extends button props except custom children.

#Styling

Every exported component accepts className when it renders an element. EnterUI styles use .eui-* classes and --eui-* variables mapped from FroggDesign theme tokens.