{item.title || item.label}
{/if} {#if item.subtitle}{item.subtitle}
{/if} {#if item.description}{item.description}
{/if} {#if item.actionLabel || item.href} {item.actionLabel || "Learn more"} {/if}component Card { outputs { click(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) action(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) navigate(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) dismiss(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) load(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) error(payload: { error: Error | string; sourceEvent?: Event; [key: string]: string | number | boolean | null | object } | Error | string) } props { title: string = "Card title" subtitle: string = "" description: string = "" header: string = "" footer: string = "" imageSrc: string = "" imageAlt: string = "" imagePosition: string = "top" actionLabel: string = "" actionHref: string = "" headerActions: unknown[] = [] navigation: unknown[] = [] activeNav: string = "" mobileNavigation: boolean = false alertTitle: string = "" alertDescription: string = "" empty: boolean = false emptyTitle: string = "No data to show" emptyIcon: string = "icon-[lucide--inbox]" items: unknown[] = [] size: string = "md" color: string = "primary" variant: string = "default" layout: string = "vertical" align: string = "left" hover: string = "none" scrollable: boolean = false maxHeight: string = "18rem" dismissible: boolean = false ariaLabel: string = "" class: string = "" } state dismissed: boolean = false functions { // Outputs must go through output.*; a CustomEvent dispatched on the root // bubbles past every parent @binding without being seen, because the // runtime keeps parent handlers in a registry only the output proxy reads. client function dispatchCardNavigation(sourceEvent, item, index) { output.navigate({ component: "Card", item: item, index: index }) } client function dispatchCardNavigationValue(sourceEvent) { output.navigate({ component: "Card", value: sourceEvent.currentTarget.value }) } client function dispatchCardHeaderAction(sourceEvent, action, index) { output.action({ component: "Card", action: action, index: index }) } client function dismissCard() { dismissed = true output.dismiss({ component: "Card", title: title }) } } view {
} }