page FeatureTabscomponent { seo { title = "FeatureTabs component" description = "Reusable feature tabs component." } view {
W WRNexusJS
content component

FeatureTabs

Reusable feature tabs component.

@wrnexus/ui 0.2.798 props1 slots0 events

Usage

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

<FeatureTabs
  eyebrow="eyebrow"
  title="title"
  description="description"
  href="href"
  actionLabel="Learn more"
/>

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

Props and attributes

PropTypeRequirementDefault
eyebrowstringOptional""
titlestringOptional""
descriptionstringOptional""
hrefstringOptional""
actionLabelstringOptional"Learn more"
imagestringOptional""
altstringOptional""
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/FeatureTabs.wrn

component FeatureTabs {
  props {
    eyebrow = ""
    title = ""
    description = ""
    href = ""
    actionLabel = "Learn more"
    image = ""
    alt = ""
    class = ""
  }

  view {
        <article class="group flex h-full min-h-72 flex-col overflow-hidden rounded-2xl border border-[var(--wire-color-border,#e2e8f0)] bg-[var(--wire-color-surface,#ffffff)] shadow-[var(--wire-shadow-1,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-1,0_12px_30px_rgb(0_0_0/0.10))] {class}">
      {#if image}
        <img src="{image}" alt="{alt}" class="aspect-[16/9] w-full border-b border-[var(--wire-color-border,#e2e8f0)] object-cover" />
      {/if}

      <div class="flex flex-1 flex-col p-6">
        {#if eyebrow}<p class="m-0 text-xs font-bold uppercase tracking-[0.14em] text-[var(--wire-color-primary,#059669)]">{eyebrow}</p>{/if}
        {#if title}<h3 class="mt-4 text-xl font-semibold leading-snug 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-muted,#64748b)]">{description}</p>{/if}
        <div class="mt-5">
        <slot />
        </div>
        {#if href}
          <a href="{href}" class="mt-6 inline-flex items-center gap-2 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)]">
        <span>{actionLabel}</span>
        <span class="transition-transform group-hover:translate-x-0.5" aria-hidden="true">→</span>
        </a>
        {/if}
      </div>
        </article>
    }
}
} }