// Generated by scripts/generate-showcase.mjs. Do not edit directly. page ClipboardDetail { layout = "showcase" state playground_value = ctx.url.searchParams.get("pg_value") ?? "sample-1" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Clipboard" state playground_copiedLabel = ctx.url.searchParams.get("pg_copiedLabel") ?? "Clipboard" state playground_errorLabel = ctx.url.searchParams.get("pg_errorLabel") ?? "Clipboard" state playground_title = ctx.url.searchParams.get("pg_title") ?? "Clipboard example" state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default clipboard for a modern application." state playground_code = (ctx.url.searchParams.get("pg_code") ?? "true") === "true" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Clipboard" description = "Theme-aware, responsive clipboard component." } view {
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
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
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
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
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
} }