HelixOverviewDocsComponentsSandboxTheme builderCortexDocsEngramBuildingTraceBuildingRecallDeclaredServicesInsightsGet in touchSource on GitHub
Loading the reference
Copy ButtonView SourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA button that puts a string on the clipboard and says it did.ExperimentalSince 0.1.0ActionsUsageimport'@fusion.dev/helix/copy-button'import'@fusion.dev/helix-headless/copy-button'Preview
API ReferenceRoothelix-copy-buttonA button that puts a string on the clipboard and says it did.
PropTypeDefaultDescriptioncommandstring""What to send when the button is activated, and what to send it to.commandForstring""The id of the element the command is sent to.commandForElementElement|nullThe element this button's command is sent to, resolved.copiedLabelstring"Copied"What it is called, and says, after one.disabledbooleanfalseWhether the control is non-interactive.emphasis"ghost"|"outlined"|"solid"|"subtle"How filled it is drawn.expandedbooleanWhether this button is a disclosure trigger, and whether its panel is open.focusablebooleantrueWhether the button holds its group's tab stop.formActionstring""Where this button's submission goes, overriding the form's own.formEnctypestring""How the submission is encoded, overriding the form's own.formMethodstring""Which HTTP method the submission uses, overriding the form's own.formNoValidatebooleanfalseWhether this submission skips the form's validation.formTargetstring""Which browsing context the response lands in, overriding the form's own.labelstring"Copy"What it is called, and says, before a press.namestring""Name submitted with the form.tone"accent"|"danger"|"neutral"|"primary"What it means.type"button"|"submit"|"reset""button"What activating the button does to its form.valuestring""What goes on the clipboard.
ReadTypeDescriptionformHTMLFormElement|nullThe form this control belongs to, if any.labelsNodeListLabels associated with this control.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The resting icon. Falls back to a clipboard.copiedWhat replaces it once the write succeeds. Falls back to a check.endContent after the label.startContent before the label, usually an icon.
EventTypeDescriptionhelix-copyHelixCopyEventFired after the clipboard write succeeds.
PartDescriptionbuttonThe inner button.markThe clipboard glyph, and the confirmation that replaces it.tooltipThe bubble, forwarded from the tooltip inside.tooltip-arrowThe point, resting against the trigger.
CSS PropertyDescription--icon-button-radiusCorner radius of the control, which a group flattens through `--button-radius-start` and `--button-radius-end`.--icon-button-shadowWhat it casts, where it is raised off the page.--icon-button-sizeEdge length of the control.
Roothelix-headless-copy-buttonA button that puts a string on the clipboard and says it did.
PropTypeDefaultDescriptioncommandstring""What to send when the button is activated, and what to send it to.commandForstring""The id of the element the command is sent to.commandForElementElement|nullThe element this button's command is sent to, resolved.copiedLabelstring"Copied"What it is called, and says, after one.disabledbooleanfalseWhether the control is non-interactive.expandedbooleanWhether this button is a disclosure trigger, and whether its panel is open.focusablebooleantrueWhether the button holds its group's tab stop.formActionstring""Where this button's submission goes, overriding the form's own.formEnctypestring""How the submission is encoded, overriding the form's own.formMethodstring""Which HTTP method the submission uses, overriding the form's own.formNoValidatebooleanfalseWhether this submission skips the form's validation.formTargetstring""Which browsing context the response lands in, overriding the form's own.labelstring"Copy"What it is called, and says, before a press.namestring""Name submitted with the form.type"button"|"submit"|"reset""button"What activating the button does to its form.valuestring""What goes on the clipboard.
ReadTypeDescriptionformHTMLFormElement|nullThe form this control belongs to, if any.labelsNodeListLabels associated with this control.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The resting icon. Falls back to a clipboard.copiedWhat replaces it once the write succeeds. Falls back to a check.endContent after the label.startContent before the label, usually an icon.
EventTypeDescriptionhelix-copyHelixCopyEventFired after the clipboard write succeeds.
PartDescriptionbuttonThe inner button.markThe clipboard glyph, and the confirmation that replaces it.tooltipThe bubble, forwarded from the tooltip inside.tooltip-arrowThe point, resting against the trigger.
ExamplesNameDescriptionEventsSaid after the clipboard write succeeded, and not before it is attempted.PreviewA button that copies a string and confirms it for a moment.PreviewA button that copies a string and confirms it for a moment.