63 lines
7.0 KiB
Plaintext
63 lines
7.0 KiB
Plaintext
page Herocomponent {
|
|
seo {
|
|
title = "Hero component"
|
|
description = "Reusable hero component."
|
|
}
|
|
|
|
view {
|
|
<div class="docs-shell">
|
|
<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />
|
|
<header class="topbar">
|
|
<a class="brand" href="/"><span>W</span> WRNexusJS</a>
|
|
<nav aria-label="Primary"><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/components">Components</a><a href="/language">Language</a><a href="/architecture">Architecture</a></nav>
|
|
<div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v0.2.73</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div>
|
|
</header>
|
|
<div class="mobile-doc-nav"><details><summary>Browse documentation</summary><nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/components">Components</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/tutorial">Tutorial</a><a href="/guides/project-structure">Guides</a><a href="/examples">Examples</a><a href="/search">Search</a></nav></details></div>
|
|
<main class="portal-main docs-layout component-detail-page"><article id="main" class="documentation prose standalone"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span>/</span><a href="/components">Components</a><span>/</span><span aria-current="page">Hero</span></nav><section class="doc-intro"><span class="eyebrow">layout component</span><h1>Hero</h1><p>Reusable hero component.</p><div class="doc-meta"><span>@wrnexus/ui 0.2.73</span><span>10 props</span><span>1 slots</span><span>0 events</span></div></section><section id="usage"><h2>Usage</h2><p>Components are auto-discovered. Use the component directly in any <code>.wrn</code> view:</p><pre data-language="wrn"><code><Hero
|
|
eyebrow="eyebrow"
|
|
title="Build faster with WRNexusJS"
|
|
highlight="highlight"
|
|
description="description"
|
|
primaryLabel="Get started"
|
|
/></code></pre><p>Legacy mount name: <code>data-component="Hero"</code>.</p></section><section id="props"><h2>Props and attributes</h2><div class="table-wrap"><table><thead><tr><th>Prop</th><th>Type</th><th>Requirement</th><th>Default</th></tr></thead><tbody><tr><td><code>class</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>eyebrow</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Optional</td><td><code>"Build faster with WRNexusJS"</code></td></tr><tr><td><code>highlight</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>primaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>"Get started"</code></td></tr><tr><td><code>primaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>"#"</code></td></tr><tr><td><code>secondaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>"Learn more"</code></td></tr><tr><td><code>secondaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>"#"</code></td></tr><tr><td><code>align</code></td><td><code>string</code></td><td>Optional</td><td><code>"center"</code></td></tr></tbody></table></div></section><section id="slots"><h2>Slots</h2><ul><li><code>default</code></li></ul></section><section id="events"><h2>Events</h2><p>This component does not declare a custom event.</p></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/Hero.wrn</code></p><pre data-language="wrn"><code>component Hero {
|
|
props {
|
|
class = ""
|
|
eyebrow = ""
|
|
title = "Build faster with WRNexusJS"
|
|
highlight = ""
|
|
description = ""
|
|
primaryLabel = "Get started"
|
|
primaryHref = "#"
|
|
secondaryLabel = "Learn more"
|
|
secondaryHref = "#"
|
|
align = "center"
|
|
}
|
|
view {
|
|
<section class="relative isolate overflow-hidden {class}">
|
|
<div class="absolute inset-0 -z-10 bg-[radial-gradient(circle_at_top,rgba(124,58,237,.18),transparent_45%)]">
|
|
</div>
|
|
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
|
<div class="max-w-4xl {align === 'center' ? 'mx-auto text-center' : ''}">
|
|
<Badge data-show="eyebrow" label="{eyebrow}" variant="brand" />
|
|
<h1 class="mt-6 text-4xl font-black tracking-tight text-slate-950 sm:text-6xl dark:text-white">{title} <span data-show="highlight" class="bg-gradient-to-r from-violet-600 to-fuchsia-500 bg-clip-text text-transparent">{highlight}</span>
|
|
</h1>
|
|
<p data-show="description" class="mt-6 text-lg leading-8 text-slate-600 sm:text-xl dark:text-slate-300">{description}</p>
|
|
<div class="mt-8 flex flex-wrap gap-3 {align === 'center' ? 'justify-center' : ''}">
|
|
<a href="{primaryHref}" class="inline-flex min-h-12 items-center rounded-xl bg-violet-600 px-5 font-semibold text-white shadow-lg shadow-violet-600/20 transition hover:-translate-y-0.5 hover:bg-violet-700">{primaryLabel}</a>
|
|
<a data-show="secondaryLabel" href="{secondaryHref}" class="inline-flex min-h-12 items-center rounded-xl border border-slate-300 bg-white px-5 font-semibold text-slate-900 transition hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-white">{secondaryLabel}</a>
|
|
</div>
|
|
<div class="mt-10">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
}
|
|
}
|
|
</code></pre></section></article><aside class="on-this-page"><h2>On this page</h2><nav><a href="#usage">Usage</a><a href="#props">Props and attributes</a><a href="#slots">Slots</a><a href="#events">Events</a><a href="#source">Source contract</a></nav></aside></main>
|
|
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS 0.2.73</strong><span>Complete API documentation generated from installed package declarations.</span></p></div><nav aria-label="Footer"><a href="/packages">All packages</a><a href="/getting-started">Get started</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Private Developer Preview · Bun-native</p></footer>
|
|
<BackToTop />
|
|
</div>
|
|
}
|
|
}
|