Skip to content
All components
feedback

Copy Button

Clipboard action with transient copied feedback.

Canonical source

Preview

This newly registered component is fully installable and documented. Its dedicated interactive showcase is generated in the extended preview pass; use the canonical source and API contract below in the meantime.

Installation

$bash
npx neoncite@latest add copy-button

Dependencies

lucide-reactbutton

API Reference

PropTypeDefaultDescription
classNamestringExtends the Neoncite classes without replacing semantic behavior.
…native / primitive propsvariesForwards the underlying React/HTML props where exposed by the component type.

States

  • default
  • semantic status variants
  • reduced-motion where animated

Accessibility

  • Uses native HTML semantics where practical; provide an accessible name for icon-only or content-dependent controls.
  • Neoncite focus-visible treatment must remain visible against OLED surfaces.
  • Decorative glow, scan, pulse, and transition effects must not be the only indication of state.
  • All non-essential animation must respect prefers-reduced-motion.

Composition

  • Install with `npx neoncite add copy-button`; registry dependencies are resolved recursively.
  • Composes Neoncite primitives: button. Customize those primitives rather than duplicating their behavior.

Token contract

--surface-0…3--hairline--foreground--muted-foreground--primary / --ringsemantic neon/glow tokens where used

SSR / hydration

Browser APIs are used only during interaction. Render the component normally during SSR and avoid invoking browser-only callbacks on the server.

RTL

Layout uses logical flow where practical; verify icon direction for directional controls in RTL products.