111 lines
9.3 KiB
Plaintext
111 lines
9.3 KiB
Plaintext
page AnnouncementBarcomponent {
|
|
seo {
|
|
title = "AnnouncementBar component"
|
|
description = "Reusable announcement bar 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.65</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">AnnouncementBar</span></nav><section class="doc-intro"><span class="eyebrow">core component</span><h1>AnnouncementBar</h1><p>Reusable announcement bar component.</p><div class="doc-meta"><span>@wrnexus/ui 0.2.65</span><span>7 props</span><span>0 slots</span><span>1 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><AnnouncementBar badge="New" message="WRNexusJS Organizations is now available." description="Build secure multi-tenant applications with teams, roles, domains, and enterprise SSO." href="/organizations" actionLabel="Explore organizations" /></code></pre><p>Legacy mount name: <code>data-component="AnnouncementBar"</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>badge</code></td><td><code>string</code></td><td>Optional</td><td><code>"New"</code></td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>Optional</td><td><code>"WRNexusJS Organizations is now available."</code></td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Optional</td><td><code>"Build secure multi-tenant applications with teams, roles, domains, and enterprise SSO."</code></td></tr><tr><td><code>href</code></td><td><code>string</code></td><td>Optional</td><td><code>"/organizations"</code></td></tr><tr><td><code>actionLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>"Explore organizations"</code></td></tr><tr><td><code>ariaLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>"Announcement"</code></td></tr></tbody></table></div></section><section id="slots"><h2>Slots</h2><p>This component does not declare a slot.</p></section><section id="events"><h2>Events</h2><ul><li><code>click</code></li></ul></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/AnnouncementBar.wrn</code></p><pre data-language="wrn"><code>component AnnouncementBar {
|
|
props {
|
|
class = ""
|
|
badge = "New"
|
|
message = "WRNexusJS Organizations is now available."
|
|
description = "Build secure multi-tenant applications with teams, roles, domains, and enterprise SSO."
|
|
href = "/organizations"
|
|
actionLabel = "Explore organizations"
|
|
ariaLabel = "Announcement"
|
|
}
|
|
|
|
state visible = true
|
|
|
|
view {
|
|
<aside
|
|
role="region"
|
|
aria-label="{ariaLabel}"
|
|
class="relative z-[70] overflow-hidden border-b border-indigo-200 bg-indigo-50 text-slate-900 dark:border-indigo-500/20 dark:bg-indigo-500/10 dark:text-white {class}"
|
|
class:hidden="!visible"
|
|
>
|
|
<!-- Decorative background -->
|
|
<div
|
|
aria-hidden="true"
|
|
class="pointer-events-none absolute inset-0 overflow-hidden"
|
|
>
|
|
<div class="absolute -left-20 -top-24 h-40 w-40 rounded-full bg-indigo-300/30 blur-3xl dark:bg-indigo-500/10"></div>
|
|
|
|
<div class="absolute -right-20 -bottom-24 h-40 w-40 rounded-full bg-violet-300/30 blur-3xl dark:bg-violet-500/10"></div>
|
|
</div>
|
|
|
|
<div
|
|
class="relative flex min-h-11 w-full items-center justify-between gap-4 px-4 py-2.5 sm:px-6 lg:px-10 xl:px-12"
|
|
>
|
|
<div class="flex min-w-0 flex-1 items-center justify-center gap-3">
|
|
<!-- Badge -->
|
|
<span
|
|
class="hidden shrink-0 items-center gap-1.5 rounded-full bg-indigo-600 px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.12em] text-white shadow-sm sm:inline-flex"
|
|
>
|
|
<span class="icon-[lucide--sparkles] h-3 w-3" aria-hidden="true" ></span>
|
|
|
|
{badge}
|
|
</span>
|
|
|
|
<!-- Message -->
|
|
<p
|
|
class="min-w-0 text-center text-xs font-medium leading-5 text-slate-700 dark:text-slate-300 sm:text-sm"
|
|
>
|
|
<span class="font-semibold text-slate-950 dark:text-white">
|
|
{message}
|
|
</span>
|
|
|
|
<span class="hidden md:inline">
|
|
{description}
|
|
</span>
|
|
</p>
|
|
|
|
<!-- CTA -->
|
|
<a
|
|
href="{href}"
|
|
class="group hidden shrink-0 items-center gap-1.5 text-xs font-bold text-indigo-700 transition hover:text-indigo-900 dark:text-indigo-300 dark:hover:text-indigo-200 sm:inline-flex"
|
|
>
|
|
{actionLabel}
|
|
|
|
<span class="icon-[lucide--arrow-right] h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5" aria-hidden="true" ></span>
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Mobile CTA -->
|
|
<a
|
|
href="{href}"
|
|
aria-label="{actionLabel}"
|
|
class="grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-indigo-100 text-indigo-700 transition hover:bg-indigo-200 dark:bg-indigo-500/15 dark:text-indigo-300 dark:hover:bg-indigo-500/25 sm:hidden"
|
|
>
|
|
<span class="icon-[lucide--arrow-up-right] h-4 w-4" aria-hidden="true" ></span>
|
|
</a>
|
|
|
|
<!-- Close -->
|
|
<button
|
|
type="button"
|
|
@click="visible = false"
|
|
aria-label="Dismiss announcement"
|
|
class="grid h-8 w-8 shrink-0 place-items-center rounded-lg text-slate-500 transition hover:bg-indigo-100 hover:text-slate-950 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-white"
|
|
>
|
|
<span class="icon-[lucide--x] h-4 w-4" aria-hidden="true" ></span>
|
|
</button>
|
|
</div>
|
|
</aside>
|
|
}
|
|
}
|
|
</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.65</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>
|
|
}
|
|
}
|