page PublicSearchcomponent {
  seo {
    title = "PublicSearch component"
    description = "Reusable public search 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.3.2</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">PublicSearch</span></nav><section class="doc-intro"><span class="eyebrow">core component</span><h1>PublicSearch</h1><p>Reusable public search component.</p><div class="doc-meta"><span>@wrnexus/ui 0.3.2</span><span>15 props</span><span>0 slots</span><span>4 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>&lt;PublicSearch
  query=&quot;query&quot;
  placeholder=&quot;Search...&quot;
  label=&quot;Search&quot;
  action=&quot;action&quot;
  method=&quot;get&quot;
/&gt;</code></pre><p>Legacy mount name: <code>data-component=&quot;PublicSearch&quot;</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>&quot;&quot;</code></td></tr><tr><td><code>query</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>placeholder</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Search...&quot;</code></td></tr><tr><td><code>label</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Search&quot;</code></td></tr><tr><td><code>action</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>method</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;get&quot;</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;q&quot;</code></td></tr><tr><td><code>buttonLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>clearLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Clear search&quot;</code></td></tr><tr><td><code>size</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;default&quot;</code></td></tr><tr><td><code>centered</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>fullWidth</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>showShortcut</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>shortcutLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;⌘ K&quot;</code></td></tr><tr><td><code>suggestions</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</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>input</code></li><li><code>focus</code></li><li><code>blur</code></li><li><code>click</code></li></ul></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/PublicSearch.wrn</code></p><pre data-language="wrn"><code>component PublicSearch &#123;
    props &#123;
        class: string = &quot;&quot;
        query = &quot;&quot;

        placeholder = &quot;Search...&quot;
        label = &quot;Search&quot;

        action = &quot;&quot;
        method = &quot;get&quot;
        name = &quot;q&quot;

        buttonLabel = &quot;&quot;
        clearLabel = &quot;Clear search&quot;

        size = &quot;default&quot;
        centered = false
        fullWidth = false

        showShortcut = false
        shortcutLabel = &quot;⌘ K&quot;

        suggestions = []
    &#125;

    state searchValue = query
    state focused = false

    view &#123;
        &lt;div
            class=&quot;w-full &#123;class&#125;&quot;
            class:max-w-2xl=&quot;!fullWidth&quot;
            class:mx-auto=&quot;centered&quot;
        &gt;
        &lt;form
                action=&quot;&#123;action&#125;&quot;
                method=&quot;&#123;method&#125;&quot;
                role=&quot;search&quot;
                class=&quot;w-full&quot;
            &gt;
        &lt;label
                    for=&quot;public-search-input&quot;
                    class=&quot;sr-only&quot;
                &gt;
                    &#123;label&#125;
                &lt;/label&gt;
        &lt;div
                    class=&quot; group relative flex w-full items-center rounded-2xl border bg-white shadow-sm transition-all duration-200 dark:bg-white/5 &#123;focused ? 'border-indigo-400 ring-4 ring-indigo-500/10 dark:border-indigo-500/50 dark:ring-indigo-500/10' : 'border-slate-200 hover:border-slate-300 dark:border-white/10 dark:hover:border-white/20' &#125; &#123;size === 'compact' ? 'min-h-11' : size === 'large' ? 'min-h-14' : 'min-h-12' &#125; &quot;
                &gt;
        &lt;!-- Search icon --&gt;
        &lt;span class=&quot; pointer-events-none absolute left-4 text-slate-400 transition group-focus-within:text-indigo-600 dark:text-slate-500 dark:group-focus-within:text-indigo-400 &#123;size === 'large' ? 'h-5 w-5' : 'h-4.5 w-4.5'&#125; icon-[lucide--search] &quot; aria-hidden=&quot;true&quot; &gt;
        &lt;/span&gt;
        &lt;!-- Input --&gt;
        &lt;input
                        id=&quot;public-search-input&quot;
                        type=&quot;search&quot;
                        name=&quot;&#123;name&#125;&quot;
                        value=&quot;&#123;searchValue&#125;&quot;
                        placeholder=&quot;&#123;placeholder&#125;&quot;
                        autocomplete=&quot;off&quot;
                        @input=&quot;searchValue = event.target.value&quot;
                        @focus=&quot;focused = true&quot;
                        @blur=&quot;focused = false&quot;
                        class=&quot; min-w-0 flex-1 bg-transparent text-slate-950 outline-none placeholder:text-slate-400 dark:text-white dark:placeholder:text-slate-500 &#123;size === 'compact' ? 'h-11 pl-11 pr-3 text-sm' : size === 'large' ? 'h-14 pl-12 pr-4 text-base' : 'h-12 pl-11 pr-4 text-sm' &#125; &quot;
                    /&gt;
        &lt;!-- Keyboard shortcut --&gt;
        &lt;span
                        class=&quot;mr-3 hidden shrink-0 items-center rounded-md border border-slate-200 bg-slate-50 px-2 py-1 text-[11px] font-semibold text-slate-400 dark:border-white/10 dark:bg-white/5 dark:text-slate-500 sm:inline-flex&quot;
                        class:hidden=&quot;!showShortcut || searchValue !== ''&quot;
                    &gt;
                        &#123;shortcutLabel&#125;
                    &lt;/span&gt;
        &lt;!-- Clear button --&gt;
        &lt;button
                        type=&quot;button&quot;
                        @click=&quot;searchValue = ''&quot;
                        aria-label=&quot;&#123;clearLabel&#125;&quot;
                        class=&quot;mr-2 grid h-8 w-8 shrink-0 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 dark:text-slate-500 dark:hover:bg-white/10 dark:hover:text-slate-200&quot;
                        class:hidden=&quot;searchValue === ''&quot;
                    &gt;
        &lt;span class=&quot;icon-[lucide--x] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;
        &lt;/span&gt;
        &lt;/button&gt;
        &lt;!-- Submit button --&gt;
        &lt;button
                        type=&quot;submit&quot;
                        class=&quot; mr-1.5 shrink-0 items-center justify-center gap-2 rounded-xl bg-indigo-600 font-bold text-white shadow-lg shadow-indigo-600/20 transition hover:-translate-y-0.5 hover:bg-indigo-500 hover:shadow-xl focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-900 &#123;size === 'compact' ? 'h-9 px-3 text-xs' : size === 'large' ? 'h-11 px-5 text-sm' : 'h-10 px-4 text-sm' &#125; &quot;
                        class:hidden=&quot;buttonLabel === ''&quot;
                        class:inline-flex=&quot;buttonLabel !== ''&quot;
                    &gt;
                        &#123;buttonLabel&#125;

                        &lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;
        &lt;/span&gt;
        &lt;/button&gt;
        &lt;/div&gt;
        &lt;/form&gt;
        &lt;!-- Suggested searches --&gt;
        &lt;div
                class=&quot;mt-4 flex flex-wrap items-center gap-2&quot;
                class:hidden=&quot;suggestions.length === 0&quot;
                class:justify-center=&quot;centered&quot;
                class:justify-start=&quot;!centered&quot;
            &gt;
        &lt;span class=&quot;mr-1 text-xs font-medium text-slate-500 dark:text-slate-400&quot;&gt;
                    Popular:
                &lt;/span&gt;

                &#123;#each suggestions.slice(0, 5) as suggestion&#125;
                &lt;a
                    href=&quot;&#123;suggestion.href&#125;&quot;
                    class=&quot;inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-xs font-semibold text-slate-600 shadow-sm transition hover:-translate-y-0.5 hover:border-indigo-300 hover:bg-indigo-50 hover:text-indigo-700 dark:border-white/10 dark:bg-white/5 dark:text-slate-300 dark:hover:border-indigo-500/30 dark:hover:bg-indigo-500/10 dark:hover:text-indigo-300&quot;
                &gt;
        &lt;span class=&quot;&#123;suggestion.iconClass&#125; h-3.5 w-3.5&quot; aria-hidden=&quot;true&quot; class:hidden=&quot;suggestion.iconClass === ''&quot; &gt;
        &lt;/span&gt;

                    &#123;suggestion.label&#125;
                &lt;/a&gt;
                &#123;/each&#125;
            &lt;/div&gt;
        &lt;/div&gt;
    &#125;
&#125;
</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.3.2</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>
  }
}
