// Generated by scripts/generate-showcase.mjs. Do not edit directly. page ClipboardDetail { layout = "showcase" state playground_value = ctx.url.searchParams.get("pg_value") ?? "npm install @wrnexus/ui" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Copy" state playground_copiedLabel = ctx.url.searchParams.get("pg_copiedLabel") ?? "Copied" state playground_errorLabel = ctx.url.searchParams.get("pg_errorLabel") ?? "Copy failed" state playground_title = ctx.url.searchParams.get("pg_title") ?? "" state playground_description = ctx.url.searchParams.get("pg_description") ?? "" state playground_iconOnly = (ctx.url.searchParams.get("pg_iconOnly") ?? "false") === "true" 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") ?? "" seo { title = "Clipboard" description = "Theme-aware, responsive clipboard component." } view {
Integrations component

Clipboard

Theme-aware, responsive clipboard component.

12 props1 slots3 outputsTheme readyResponsive
Interactive playground

Configure Clipboard

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

Live preview
Component code
<Clipboard
  value="npm install @wrnexus/ui"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props12 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="npm install @wrnexus/ui"
/>
Dense UI

Compact application

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

02
Live preview
Component usage.wrn
<Clipboard
  value="npm install @wrnexus/ui"
  iconOnly="true"
/>
Extended

Rich configuration

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

03
Live preview
Component usage.wrn
<Clipboard
  value="npm install @wrnexus/ui"
  iconOnly="true"
/>
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
iconOnlybooleanfalseNo
codebooleantrueNo
sizestring"default"No
colorstring"primary"No
disabledbooleanfalseNo
classstring""No
} }