Clipboard | UI Showcase
WRNexus UI
Integrations component

Clipboard

Theme-aware, responsive clipboard component.

11 props1 slots3 outputsTheme readyResponsive
Interactive playground

Configure Clipboard

Change any prop and inspect the server-rendered component immediately.

Live preview
Clipboard example

A polished default clipboard for a modern application.

sample-1
Component code
<Clipboard
  value="sample-1"
  label="Clipboard"
  copiedLabel="Clipboard"
  errorLabel="Clipboard"
  title="Clipboard example"
  description="A polished default clipboard for a modern application."
/>
Event outputInteract with the preview to inspect the typed payload.
Component props11 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Clipboard example

A polished default clipboard for a modern application.

sample-1
Component usage.wrn
<Clipboard
  value="sample-1"
  label="Clipboard"
  copiedLabel="Clipboard"
  errorLabel="Clipboard"
  title="Clipboard example"
  description="A polished default clipboard for a modern application."
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Compact Clipboard

A compact configuration for dashboards and dense product surfaces.

sample-2
Component usage.wrn
<Clipboard
  value="sample-2"
  label="Compact example"
  copiedLabel="Compact example"
  errorLabel="Compact example"
  title="Compact Clipboard"
  description="A compact configuration for dashboards and dense product surfaces."
  size="sm"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Advanced Clipboard

A richer configuration demonstrating additional content and hierarchy.

sample-3
Component usage.wrn
<Clipboard
  value="sample-3"
  label="Advanced example"
  copiedLabel="Advanced example"
  errorLabel="Advanced example"
  title="Advanced Clipboard"
  description="A richer configuration demonstrating additional content and hierarchy."
  size="lg"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@copyFires when the component emits the copy event.
@successFires when the component emits the success event.
@errorFires when the component cannot complete an operation.
Declarative handlers.wrn
<Clipboard
  @copy='console.log(payload)'
  @success='console.log(payload)'
  @error='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"Clipboard\"], [data-component=\"Clipboard\"]")

if (component) registerOutputHandler(component, "copy", (payload) => {
  console.log("copy", payload)
})

if (component) registerOutputHandler(component, "success", (payload) => {
  console.log("success", payload)
})

if (component) registerOutputHandler(component, "error", (payload) => {
  console.log("error", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
valuestring""No
labelstring"Copy"No
copiedLabelstring"Copied"No
errorLabelstring"Copy failed"No
titlestring"Clipboard"No
descriptionstring""No
codebooleantrueNo
sizestring"default"No
colorstring"primary"No
disabledbooleanfalseNo
classstring""No