Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
<Clipboard
value="npm install @wrnexus/ui"
/>
// 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 {
Theme-aware, responsive clipboard component. Change any prop and inspect the server-rendered component immediately.Clipboard
Configure Clipboard
<Clipboard
value="npm install @wrnexus/ui"
/>payload.
Compare configurations and resize the browser to check responsive behavior.
Balanced spacing, hierarchy, and content for the most common product workflow.
<Clipboard
value="npm install @wrnexus/ui"
/>
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<Clipboard
value="npm install @wrnexus/ui"
iconOnly="true"
/>
A more expressive variation using additional data, stronger emphasis, and optional states.
<Clipboard
value="npm install @wrnexus/ui"
iconOnly="true"
/>
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.<Clipboard
@copy='console.log(payload)'
@success='console.log(payload)'
@error='console.log(payload)'
/>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)
})All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
value | string | "" | No |
label | string | "Copy" | No |
copiedLabel | string | "Copied" | No |
errorLabel | string | "Copy failed" | No |
title | string | "Clipboard" | No |
description | string | "" | No |
iconOnly | boolean | false | No |
code | boolean | true | No |
size | string | "default" | No |
color | string | "primary" | No |
disabled | boolean | false | No |
class | string | "" | No |