Skip to content

InputCopy

Read-only input with a copy-to-clipboard button and animated check feedback.

Installation

Install InputCopy from the Fluid Effect UI registry.

Basic

With Label

Install command

Button Variant

Left Aligned

Disabled

Invite code

Copy Callback

Share link
Copied 0 times

API Reference

Types come from the public API. A dash indicates no default is documented here.

InputCopy props

Public source
PropTypeDefaultDescription
keyKeepAliveKey<K, Ends> | undefined''The child's identity among its parent's children of one component, or a kept child's among its author's. The empty string by default.
onEmit
Show type
((events: { readonly _tag: "Copied"; } | { readonly _tag: "CopyFailed"; }) => NoInfer<Msg> | undefined) | { readonly Copied: (event: { readonly _tag: "Copied"; }) => NoInfer<Msg> | undefined; readonly CopyFailed: (event: { readonly _tag: "CopyFailed"; }) => NoInfer<Msg> | undefined; } | undefined
—Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event.
props.idstringRequired
props.valuestringRequired
props.labelstring—
props.disabledboolean—
props.size"default" | "compact"—
props.classNamestring—
props.shape"rounded" | "pill" | "sharp"'rounded'
props.variant"button" | "icon"—
props.align"left" | "right"—
props.iconOnlyboolean—
props.accessibleLabelstring(model.status === 'idle' ? p.label ? 'Copy' : 'Copy to clipboard' : model.status === 'error' ? 'Copy failed' : 'Copied')