page ChannelCardcomponent { seo { title = "ChannelCard component" description = "Reusable channel card component." } view {
W WRNexusJS
content component

ChannelCard

Reusable channel card component.

@wrnexus/ui 0.2.785 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<ChannelCard
  title="title"
  description="description"
  href="href"
  icon="icon-[lucide--radio-tower]"
/>

Legacy mount name: data-component="ChannelCard".

Props and attributes

PropTypeRequirementDefault
titlestringOptional""
descriptionstringOptional""
hrefstringOptional""
iconstringOptional"icon-[lucide--radio-tower]"
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/ChannelCard.wrn

component ChannelCard {
  props {
    title = ""
    description = ""
    href = ""
    icon = ""
    class = ""
  }

  view {
        <article class="group flex h-full min-h-72 flex-col rounded-2xl border border-[var(--wire-color-border,#e2e8f0)] bg-[var(--wire-color-surface,#ffffff)] p-6 shadow-[var(--wire-shadow-sm,0_1px_2px_rgb(0_0_0/0.05))] transition duration-200 hover:-translate-y-1 hover:border-[var(--wire-color-primary,#059669)] hover:shadow-[var(--wire-shadow-md,0_12px_30px_rgb(0_0_0/0.10))] {class}">
        <div class="flex min-h-12 items-start justify-between gap-4">
        {#if icon}
          <span class="inline-grid h-12 w-12 shrink-0 place-items-center rounded-xl border border-[var(--wire-color-border,#e2e8f0)] bg-[var(--wire-color-primary-soft,#ecfdf5)] text-xl text-[var(--wire-color-primary,#059669)] {icon}" aria-hidden="true">
        </span>
        {/if}
        <div class="flex min-w-0 justify-end">
        <slot />
        </div>
        </div>

      {#if title}<h3 class="mt-5 text-xl font-semibold tracking-[-0.02em] text-[var(--wire-color-text,#0f172a)]">{title}</h3>{/if}
      {#if description}<p class="mt-3 flex-1 leading-7 text-[var(--wire-color-text-muted,#64748b)]">{description}</p>{/if}

      {#if href}
        <a href="{href}" class="mt-6 inline-flex items-center justify-between gap-3 border-t border-[var(--wire-color-border,#e2e8f0)] pt-5 font-semibold text-[var(--wire-color-primary,#059669)] no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--wire-color-primary,#059669)]" aria-label="Explore {title}">
        <span>Explore {title}</span>
        <span class="transition-transform group-hover:translate-x-0.5" aria-hidden="true">→</span>
        </a>
      {/if}
    </article>
    }
}
} }