Skip to content
Preview
482913
Preview

KT7M-PQR9-N4YA-J3TR-M8DW-F5LX-H9JN

CodeInput

length
number
Default: 6
kind
"numeric" | "alphanumeric"
Default: "numeric"
value
string
defaultValue
string
Default: ""
onValueChange
(value: string) => void
onComplete
(value: string) => void
invalid
boolean
Default: false
success
boolean
Default: false
disabled
boolean
Default: false
autoFocus
boolean
Default: false
group
number
Default: 3
label
string
name
string
id
string
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

coderequired
string
The code, without separators ("482913").
group
number
Default: 3
Characters per visual group (a gap, never a character, separates them).
size
"md" | "lg"
Default: "lg"
lg for the one code a screen is about; md inside a row or a sheet.
label
string
Default: "Code"
What the code is, for assistive tech ("Code"): the group's name, never drawn.
rootStyle
RootStyle
Typed StyleX override: layout only.

valuerequired
string
perLine
number
Default: 4
labelrequired
string
actions
ReactNode
onCopied
() => void
rootStyle
RootStyle
A component's typed override prop: Layout and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

textrequired
string | (() => string)
The text written to the clipboard (or a function that produces it at click time).
label
string
Default: "Copy"
The label at rest.
copiedLabel
string
Default: "Copied"
The label for COPIED_HOLD_MS after a copy that landed.
failedLabel
string
Default: "Couldn't copy"
The label after a copy the clipboard refused.
iconOnly
boolean
Default: false
Draw only the glyph (an IconButton named by label).
clipboard
ClipboardWriteOptions
Clipboard options: clearAfterMs for a secret.
onCopied
(ok: boolean) => void
Called after every copy with whether it landed.
variant
"primary" | "secondary" | "ghost" | "text" | "danger" | "bare"
Default: "secondary"
primary is the monochrome ink CTA, for the one action that moves the flow forward (send). bare is a row or a line of text that presses: no fill, frame, padding or height of its own, in the text style and ink of the line it stands in, its label on its capitals, its ink a step up under the pointer.
size
"xs" | "sm" | "md" | "lg"
Default: "sm"
Heights 20 / 24 / 28 / 32: xs and sm stand in a Caption pair, md in Body, lg in Headline, all bold.
tone
"neutral"
density
"compact" | "large"
iconEnd
IconName
Trailing icon. Beside a wrapped text label, it sits on the first line.
hint
ShortcutSpec | ReactElement
Trailing key hint, drawn quietly: "⇧Tab", "⏎", ["⌘","K"], "mod+k", or a Kbd. It stands at the end of a button wider than its words (a search trigger), the label taking the room between. Visual only (aria-hidden, so the name stays "Allow", not "Allow ⏎"); the keys are exposed as aria-keyshortcuts on the button. Binding the key is yours.
progress
number
Determinate progress, 0..1: a ring fills in the icon's slot (a download, an upload) while the label says the number. The button stays pressable; loading wins when both are set.
labelRow
boolean
The label is a row of parts (an avatar beside words), each on its capitals.
wrap
boolean
Default: false
Its label wraps onto more lines instead of running past the button, growing it: a choice whose words are longer than a narrow column. One line keeps the control's height.
roundEnds
boolean
Each side that ends in text takes the room its round end cuts (R12) under a pill's corner too. A pill always takes it.
rootStyle
ButtonStyle
Typed StyleX override: where the button sits (margins, self-alignment, flex and grid placement, size bounds) and its --button-* knobs.
render
RenderProp<{ disabled: boolean }>
Replace the rendered element, e.g. render={<a href="/settings" />}, or a function of props and state.
disabled
boolean
Native disabled: no pointer events, no tooltip, skipped by Tab.
focusableWhenDisabled
boolean
Keep a disabled control focusable and hoverable (aria-disabled), so a tooltip can say why.
nativeButton
boolean
Button semantics, inferred from what renders: a <button> is native, an <a> stays a link, anything else gets role="button" and key handling. false forces button semantics on whatever renders (a link acting as a button).

Rest props go to <button> props.

State machine

PreviewA code is ready to copy to another device.
482913