Team workspace
One place for your projects, files, and conversations.
Supporting content belongs inside the default slot.
Group related content in a responsive themed surface with title, description, content, and supporting slots.
Change any prop and inspect the server-rendered component immediately.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
title="Team workspace"
description="One place for your projects, files, and conversations."
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
payload.Compare configurations and resize the browser to check responsive behavior.
Group a title, description, content, and supporting actions.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
title="Citizen service"
description="Access a trusted online service."
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<p class="showcase-card-copy">Supporting content belongs inside the default slot.</p>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
Use reduced spacing for metrics, filters, and operational information.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
title="Open requests"
description="Requests waiting for assignment."
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}"
size="compact"
variant="soft">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<strong class="showcase-card-value">38</strong>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
Keep the description and next action together in a single surface.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
title="Featured guide"
description="A complete guide to public safety and emergency readiness."
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}"
size="lg">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<a href="#guide" class="showcase-action">Read guide</a>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
A cover image, concise body, and separate footer.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
title="Design your next chapter"
description="A practical guide to building thoughtful products."
footer="6 min read"
imageSrc="/showcase-images/green-hero.svg"
imageAlt="Green abstract cover"
actionLabel="Read guide"
actionHref="#guide"
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
Body content with an optional footer; no reserved heading space.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
description="Your workspace is ready. Invite your teammates to get started."
footer="Updated just now"
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
A simple image surface without header or footer chrome.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
imageSrc="/showcase-images/blue-mountain.svg"
imageAlt="Blue geometric landscape"
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<div class="showcase-slot">header slot</div>
</div>
<div data-slot="footer">
<div class="showcase-slot">footer slot</div>
</div>
</Card>
}
}
Supply arbitrary header, body, and footer content. Use showHeader and showFooter to hide either region.
page CardExample {
state headerActions = []
state navigation = []
state items = []
view {
<Card
headerActions="{headerActions}"
navigation="{navigation}"
items="{items}">
<div data-slot="header">
<strong>Team invitation</strong>
</div>
<Input label="Email" placeholder="name@company.com" />
<div data-slot="footer">
<Button label="Send invitation" />
</div>
</Card>
}
}
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.
@clickFires when the interactive surface is activated.@actionFires when the component's primary or item action is activated.@navigateFires when the component emits the navigate event.@dismissFires after the announcement or feedback surface is dismissed.@loadFires after remote or deferred content loads successfully.@errorFires when the component cannot complete an operation.<Card
@click='console.log(payload)'
@action='console.log(payload)'
@navigate='console.log(payload)'
@dismiss='console.log(payload)'
@load='console.log(payload)'
@error='console.log(payload)'
/>import { registerOutputHandler } from "@wrnexus/csr/outputs"
const component = document.querySelector("[data-ui-component=\"Card\"], [data-component=\"Card\"]")
if (component) registerOutputHandler(component, "click", (payload) => {
console.log("click", payload)
})
if (component) registerOutputHandler(component, "action", (payload) => {
console.log("action", payload)
})
if (component) registerOutputHandler(component, "navigate", (payload) => {
console.log("navigate", payload)
})
if (component) registerOutputHandler(component, "dismiss", (payload) => {
console.log("dismiss", payload)
})
if (component) registerOutputHandler(component, "load", (payload) => {
console.log("load", 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 |
|---|---|---|---|
title | string | "" | No |
icon | string | "" | No |
titleKey | string | "" | No |
subtitle | string | "" | No |
subtitleKey | string | "" | No |
description | string | "" | No |
descriptionKey | string | "" | No |
showHeader | boolean | true | No |
showFooter | boolean | true | No |
header | string | "" | No |
footer | string | "" | No |
imageSrc | string | "" | No |
imageAlt | string | "" | No |
imagePosition | string | "top" | No |
actionLabel | string | "" | No |
actionLabelKey | string | "" | No |
actionHref | string | "" | No |
headerActions | unknown[] | [] | No |
navigation | unknown[] | [] | No |
activeNav | string | "" | No |
mobileNavigation | boolean | false | No |
alertTitle | string | "" | No |
alertDescription | string | "" | No |
empty | boolean | false | No |
emptyTitle | string | "No data to show" | No |
emptyIcon | string | "icon-[lucide--inbox]" | No |
items | unknown[] | [] | No |
size | string | "md" | No |
color | string | "primary" | No |
variant | string | "default" | No |
layout | string | "vertical" | No |
align | string | "left" | No |
hover | string | "none" | No |
radius | string | "default" | No |
shadow | string | "default" | No |
equalHeight | boolean | false | No |
scrollable | boolean | false | No |
maxHeight | string | "18rem" | No |
dismissible | boolean | false | No |
ariaLabel | string | "" | No |
class | string | "" | No |