Files
WRNexusJSDoc/app/pages/components/combo-box.wrn
T

421 lines
25 KiB
Plaintext

page ComboBoxcomponent {
seo {
title = "ComboBox component"
description = "Editable autocomplete combobox with local and remote suggestions."
}
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.5.0</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">ComboBox</span></nav><section class="doc-intro"><span class="eyebrow">advanced-forms component</span><h1>ComboBox</h1><p>Editable autocomplete combobox with local and remote suggestions.</p><div class="doc-meta"><span>@wrnexus/ui 0.5.0</span><span>41 props</span><span>0 slots</span><span>8 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;ComboBox
size=&quot;default&quot;
color=&quot;primary&quot;
label=&quot;ComboBox&quot;
name=&quot;name&quot;
value=&quot;value&quot;
/&gt;</code></pre><p>Legacy mount name: <code>data-component=&quot;ComboBox&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>size</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;default&quot;</code></td></tr><tr><td><code>color</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;primary&quot;</code></td></tr><tr><td><code>label</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;ComboBox&quot;</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>options</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</code></td></tr><tr><td><code>groups</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</code></td></tr><tr><td><code>placeholder</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Search or select an option&quot;</code></td></tr><tr><td><code>searchPlaceholder</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Start typing…&quot;</code></td></tr><tr><td><code>clearable</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>allowCustomValue</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>disabled</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>required</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>invalid</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>validationMessage</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>helpText</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>loading</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>loadingLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Loading suggestions…&quot;</code></td></tr><tr><td><code>emptyLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;No matching options&quot;</code></td></tr><tr><td><code>clearLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Clear value&quot;</code></td></tr><tr><td><code>toggleLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Toggle suggestions&quot;</code></td></tr><tr><td><code>searchMode</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;contains&quot;</code></td></tr><tr><td><code>searchFields</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;label,description&quot;</code></td></tr><tr><td><code>minSearchLength</code></td><td><code>number</code></td><td>Optional</td><td><code>0</code></td></tr><tr><td><code>searchResultLimit</code></td><td><code>number</code></td><td>Optional</td><td><code>0</code></td></tr><tr><td><code>optionTemplate</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;default&quot;</code></td></tr><tr><td><code>defaultOpen</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>closeOnSelect</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>fixed</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>placement</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;bottom&quot;</code></td></tr><tr><td><code>autocomplete</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;off&quot;</code></td></tr><tr><td><code>remote</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>remoteUrl</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>remoteQueryParam</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;q&quot;</code></td></tr><tr><td><code>remoteDebounce</code></td><td><code>number</code></td><td>Optional</td><td><code>250</code></td></tr><tr><td><code>remoteAutoLoad</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>infinite</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>hasMore</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>page</code></td><td><code>number</code></td><td>Optional</td><td><code>1</code></td></tr><tr><td><code>loadMoreLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Load more&quot;</code></td></tr><tr><td><code>class</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</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>search</code></li><li><code>select</code></li><li><code>change</code></li><li><code>clear</code></li><li><code>open</code></li><li><code>close</code></li><li><code>load</code></li><li><code>error</code></li></ul></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/Combobox.wrn</code></p><pre data-language="wrn"><code>component ComboBox &#123;
props &#123;
size = &quot;default&quot;
color = &quot;primary&quot;
label = &quot;ComboBox&quot;
name = &quot;&quot;
value = &quot;&quot;
options = []
groups = []
placeholder = &quot;Search or select an option&quot;
searchPlaceholder = &quot;Start typing…&quot;
clearable = true
allowCustomValue = false
disabled = false
required = false
invalid = false
validationMessage = &quot;&quot;
helpText = &quot;&quot;
loading = false
loadingLabel = &quot;Loading suggestions…&quot;
emptyLabel = &quot;No matching options&quot;
clearLabel = &quot;Clear value&quot;
toggleLabel = &quot;Toggle suggestions&quot;
searchMode = &quot;contains&quot;
searchFields = &quot;label,description&quot;
minSearchLength = 0
searchResultLimit = 0
optionTemplate = &quot;default&quot;
defaultOpen = false
closeOnSelect = true
fixed = false
placement = &quot;bottom&quot;
autocomplete = &quot;off&quot;
remote = false
remoteUrl = &quot;&quot;
remoteQueryParam = &quot;q&quot;
remoteDebounce = 250
remoteAutoLoad = true
infinite = false
hasMore = false
page = 1
loadMoreLabel = &quot;Load more&quot;
class = &quot;&quot;
@event search = function
@event select = function
@event change = function
@event clear = function
@event open = function
@event close = function
@event load = function
@event error = function
&#125;
state open = defaultOpen
state query = &quot;&quot;
state selectedValue = value
state activeIndex = -1
functions &#123;
function allOptions() &#123;
return [...groups.flatMap((group) =&gt; group.options || []), ...options]
&#125;
function searchableText(option) &#123;
return ((option.label || &quot;&quot;) + &quot; &quot; + (option.description || &quot;&quot;)).toLowerCase()
&#125;
function matches(option) &#123;
if (!query || query.length &lt; minSearchLength) &#123;
return true
&#125;
if (searchMode === &quot;startsWith&quot;) &#123;
return searchableText(option).startsWith(query.toLowerCase())
&#125;
if (searchMode === &quot;exact&quot;) &#123;
return searchableText(option) === query.toLowerCase()
&#125;
return searchableText(option).includes(query.toLowerCase())
&#125;
function matchingOptions(list) &#123;
return list.filter((option) =&gt; matches(option))
&#125;
function visibleOptions(list) &#123;
if (searchResultLimit &gt; 0) &#123;
return matchingOptions(list).slice(0, searchResultLimit)
&#125;
return matchingOptions(list)
&#125;
function flatVisibleOptions() &#123;
return visibleOptions(allOptions())
&#125;
function isSelected(option) &#123;
return selectedValue === option.value
&#125;
function selectedOptions() &#123;
return allOptions().filter((option) =&gt; isSelected(option))
&#125;
function selectedText() &#123;
return selectedOptions().length ? selectedOptions()[0].label : selectedValue
&#125;
function inputText() &#123;
return query || selectedText()
&#125;
function shouldShowDropdown() &#123;
if (!open) &#123;
return false
&#125;
if (loading) &#123;
return true
&#125;
if (remote &amp;&amp; query.length !== 0 &amp;&amp; query.length &lt; minSearchLength) &#123;
return true
&#125;
if (flatVisibleOptions().length) &#123;
return true
&#125;
return infinite &amp;&amp; hasMore
&#125;
function canSelect(option) &#123;
return !option.disabled
&#125;
function chooseOption(option) &#123;
if (!canSelect(option)) &#123;
return
&#125;
selectedValue = option.value
query = option.label
activeIndex = optionIndex(option)
if (closeOnSelect) &#123;
open = false
&#125;
&#125;
function updateQuery(event) &#123;
query = event.target.value
selectedValue = allowCustomValue ? event.target.value : &quot;&quot;
open = true
activeIndex = flatVisibleOptions().length ? 0 : -1
&#125;
function clearValue(event) &#123;
if (event) &#123;
event.stopPropagation()
&#125;
query = &quot;&quot;
selectedValue = &quot;&quot;
activeIndex = -1
open = false
&#125;
function openDropdown() &#123;
if (!disabled) &#123;
open = true
activeIndex = flatVisibleOptions().length ? 0 : -1
&#125;
&#125;
function closeDropdown() &#123;
open = false
&#125;
function toggle() &#123;
if (open) &#123;
closeDropdown()
&#125; else &#123;
openDropdown()
&#125;
&#125;
function setValue(nextValue) &#123;
selectedValue = nextValue
query = &quot;&quot;
&#125;
function moveActive(direction) &#123;
if (!flatVisibleOptions().length) &#123;
return
&#125;
activeIndex = (activeIndex + direction + flatVisibleOptions().length) % flatVisibleOptions().length
&#125;
function handleKeydown(event) &#123;
if (disabled) &#123;
return
&#125;
if (event.key === &quot;ArrowDown&quot;) &#123;
event.preventDefault()
openDropdown()
moveActive(1)
&#125; else if (event.key === &quot;ArrowUp&quot;) &#123;
event.preventDefault()
openDropdown()
moveActive(-1)
&#125; else if (event.key === &quot;Enter&quot; &amp;&amp; open &amp;&amp; activeIndex &gt;= 0) &#123;
event.preventDefault()
chooseOption(flatVisibleOptions()[activeIndex])
&#125; else if (event.key === &quot;Escape&quot;) &#123;
closeDropdown()
&#125; else if (event.key === &quot;Home&quot; &amp;&amp; open) &#123;
event.preventDefault()
activeIndex = 0
&#125; else if (event.key === &quot;End&quot; &amp;&amp; open) &#123;
event.preventDefault()
activeIndex = flatVisibleOptions().length - 1
&#125;
&#125;
function optionIndex(option) &#123;
return flatVisibleOptions().findIndex((item) =&gt; item.value === option.value)
&#125;
&#125;
view &#123;
&lt;div
class=&quot;wire-next wire-next--color-&#123;color&#125; wire-next--size-&#123;size&#125; wire-next--advanced-select wire-next--combobox &#123;open ? 'wire-next--open' : ''&#125; &#123;fixed ? 'wire-next--advanced-select-fixed' : ''&#125; &#123;invalid ? 'wire-next--invalid' : ''&#125; &#123;disabled ? 'wire-next--disabled' : ''&#125; &#123;class&#125;&quot;
data-placement=&quot;&#123;placement&#125;&quot;
data-search-mode=&quot;&#123;searchMode&#125;&quot;
data-remote=&quot;&#123;remote ? 'true' : 'false'&#125;&quot;
data-remote-url=&quot;&#123;remoteUrl&#125;&quot;
data-remote-query-param=&quot;&#123;remoteQueryParam&#125;&quot;
data-remote-debounce=&quot;&#123;remoteDebounce&#125;&quot;
data-remote-auto-load=&quot;&#123;remoteAutoLoad ? 'true' : 'false'&#125;&quot;
data-infinite=&quot;&#123;infinite ? 'true' : 'false'&#125;&quot;
data-page=&quot;&#123;page&#125;&quot;
data-wrn-select
data-wrn-combobox
@focusout=&quot;if (!event.currentTarget.contains(event.relatedTarget)) &#123; closeDropdown() &#125;&quot;
&gt;
&lt;label id=&quot;&#123;name&#125;-label&quot; for=&quot;&#123;name&#125;-input&quot;&gt;&#123;label&#125;&lt;/label&gt;
&lt;div class=&quot;wire-next__select-control wire-next__combobox-control&quot;&gt;
&lt;span class=&quot;wire-next__search-icon icon-[lucide--search]&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/span&gt;
&lt;input
&#123;...attrs&#125;
id=&quot;&#123;name&#125;-input&quot;
class=&quot;wire-next__select-trigger wire-next__combobox-input&quot;
type=&quot;text&quot;
role=&quot;combobox&quot;
name=&quot;&#123;allowCustomValue ? name : ''&#125;&quot;
value=&quot;&#123;inputText()&#125;&quot;
placeholder=&quot;&#123;placeholder&#125;&quot;
autocomplete=&quot;&#123;autocomplete&#125;&quot;
aria-autocomplete=&quot;list&quot;
aria-haspopup=&quot;listbox&quot;
aria-expanded=&quot;&#123;open&#125;&quot;
aria-controls=&quot;&#123;name&#125;-listbox&quot;
aria-labelledby=&quot;&#123;name&#125;-label&quot;
aria-invalid=&quot;&#123;invalid&#125;&quot;
disabled=&quot;&#123;disabled&#125;&quot;
required=&quot;&#123;required &amp;&amp; allowCustomValue&#125;&quot;
@focus=&quot;openDropdown()&quot;
@click=&quot;openDropdown()&quot;
@input=&quot;updateQuery(event)&quot;
@keydown=&quot;handleKeydown(event)&quot;
/&gt;
&lt;button
type=&quot;button&quot;
class=&quot;wire-next__clear-select&quot;
data-show=&quot;clearable &amp;&amp; inputText() &amp;&amp; !disabled&quot;
aria-label=&quot;&#123;clearLabel&#125;&quot;
title=&quot;&#123;clearLabel&#125;&quot;
@click=&quot;clearValue(event)&quot;
&gt;
&lt;span class=&quot;icon-[lucide--x]&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/span&gt;
&lt;/button&gt;
&lt;button
type=&quot;button&quot;
class=&quot;wire-next__combobox-toggle&quot;
aria-label=&quot;&#123;toggleLabel&#125;&quot;
tabindex=&quot;-1&quot;
disabled=&quot;&#123;disabled&#125;&quot;
@click=&quot;toggle()&quot;
&gt;
&lt;span class=&quot;wire-next__select-chevron icon-[lucide--chevrons-up-down]&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/span&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;div
class=&quot;wire-next__select-dropdown &#123;fixed ? 'wire-next__select-dropdown--fixed' : ''&#125;&quot;
data-show=&quot;shouldShowDropdown()&quot;
style=&quot;&#123;shouldShowDropdown() ? '' : 'display: none'&#125;&quot;
&gt;
&lt;div
class=&quot;wire-next__select-message&quot;
data-show=&quot;remote &amp;&amp; query.length !== 0 &amp;&amp; query.length &lt; minSearchLength&quot;
&gt;Enter at least &#123;minSearchLength&#125; characters.&lt;/div&gt;
&lt;div class=&quot;wire-next__select-message&quot; data-show=&quot;loading&quot; role=&quot;status&quot;&gt;
&lt;i class=&quot;wire-spinner wire-spinner--inline&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/i&gt;
&#123;loadingLabel&#125;
&lt;/div&gt;
&lt;div
id=&quot;&#123;name&#125;-listbox&quot;
class=&quot;wire-next__select-list&quot;
data-show=&quot;(!remote || (query.length === 0 &amp;&amp; remoteAutoLoad) || query.length &gt;= minSearchLength) &amp;&amp; !loading&quot;
role=&quot;listbox&quot;
&gt;
&#123;#each groups as group&#125;
&#123;#if visibleOptions(group.options || []).length&#125;
&lt;div class=&quot;wire-next__option-group&quot; role=&quot;group&quot; aria-label=&quot;&#123;group.label&#125;&quot;&gt;
&lt;div class=&quot;wire-next__group-label&quot;&gt;&#123;group.label&#125;&lt;/div&gt;
&#123;#each group.options || [] as option&#125;
&lt;button
type=&quot;button&quot;
class=&quot;wire-next__select-option &#123;isSelected(option) ? 'wire-next__select-option--selected' : ''&#125; &#123;optionIndex(option) === activeIndex ? 'wire-next__select-option--active' : ''&#125;&quot;
data-option-value=&quot;&#123;option.value&#125;&quot;
data-show=&quot;matches(option)&quot;
role=&quot;option&quot;
aria-selected=&quot;&#123;isSelected(option)&#125;&quot;
disabled=&quot;&#123;!canSelect(option)&#125;&quot;
@mouseenter=&quot;activeIndex = optionIndex(option)&quot;
@mousedown=&quot;event.preventDefault()&quot;
@click=&quot;chooseOption(option)&quot;
&gt;
&#123;#if optionTemplate === &quot;icon&quot; &amp;&amp; option.icon&#125;&lt;i class=&quot;&#123;option.icon&#125;&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/i&gt;&#123;/if&#125;
&#123;#if optionTemplate === &quot;avatar&quot; &amp;&amp; option.avatar&#125;&lt;img src=&quot;&#123;option.avatar&#125;&quot; alt=&quot;&quot; /&gt;&#123;/if&#125;
&#123;#if optionTemplate === &quot;color&quot; &amp;&amp; option.color&#125;&lt;i class=&quot;wire-next__color-dot&quot; style=&quot;--option-color: &#123;option.color&#125;&quot;&gt;
&lt;/i&gt;&#123;/if&#125;
&lt;span&gt;
&lt;strong&gt;&#123;option.label&#125;&lt;/strong&gt;&#123;#if option.description&#125;&lt;small&gt;&#123;option.description&#125;&lt;/small&gt;&#123;/if&#125;&lt;/span&gt;
&lt;i class=&quot;wire-next__check icon-[lucide--check]&quot; data-show=&quot;isSelected(option)&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/i&gt;
&lt;/button&gt;
&#123;/each&#125;
&lt;/div&gt;
&#123;/if&#125;
&#123;/each&#125;
&#123;#each options as option&#125;
&lt;button
type=&quot;button&quot;
class=&quot;wire-next__select-option &#123;isSelected(option) ? 'wire-next__select-option--selected' : ''&#125; &#123;optionIndex(option) === activeIndex ? 'wire-next__select-option--active' : ''&#125;&quot;
data-option-value=&quot;&#123;option.value&#125;&quot;
data-show=&quot;matches(option)&quot;
role=&quot;option&quot;
aria-selected=&quot;&#123;isSelected(option)&#125;&quot;
disabled=&quot;&#123;!canSelect(option)&#125;&quot;
@mouseenter=&quot;activeIndex = optionIndex(option)&quot;
@mousedown=&quot;event.preventDefault()&quot;
@click=&quot;chooseOption(option)&quot;
&gt;
&#123;#if optionTemplate === &quot;icon&quot; &amp;&amp; option.icon&#125;&lt;i class=&quot;&#123;option.icon&#125;&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/i&gt;&#123;/if&#125;
&#123;#if optionTemplate === &quot;avatar&quot; &amp;&amp; option.avatar&#125;&lt;img src=&quot;&#123;option.avatar&#125;&quot; alt=&quot;&quot; /&gt;&#123;/if&#125;
&#123;#if optionTemplate === &quot;color&quot; &amp;&amp; option.color&#125;&lt;i class=&quot;wire-next__color-dot&quot; style=&quot;--option-color: &#123;option.color&#125;&quot;&gt;
&lt;/i&gt;&#123;/if&#125;
&lt;span&gt;
&lt;strong&gt;&#123;option.label&#125;&lt;/strong&gt;&#123;#if option.description&#125;&lt;small&gt;&#123;option.description&#125;&lt;/small&gt;&#123;/if&#125;&lt;/span&gt;
&lt;i class=&quot;wire-next__check icon-[lucide--check]&quot; data-show=&quot;isSelected(option)&quot; aria-hidden=&quot;true&quot;&gt;
&lt;/i&gt;
&lt;/button&gt;
&#123;/each&#125;
&lt;/div&gt;
&lt;button
type=&quot;button&quot;
class=&quot;wire-next__load-more&quot;
data-wrn-select-load-more
data-show=&quot;infinite &amp;&amp; hasMore&quot;
&gt;&#123;loadMoreLabel&#125;&lt;/button&gt;
&lt;/div&gt;
&#123;#if !allowCustomValue&#125;
&lt;input
type=&quot;hidden&quot;
name=&quot;&#123;name&#125;&quot;
value=&quot;&#123;selectedValue&#125;&quot;
required=&quot;&#123;required&#125;&quot;
data-error=&quot;&#123;name&#125;&quot;
aria-describedby=&quot;&#123;validationMessage ? `$&#123;name&#125;-validation` : helpText ? `$&#123;name&#125;-help` : ''&#125;&quot;
/&gt;
&#123;/if&#125;
&#123;#if helpText &amp;&amp; !validationMessage&#125;&lt;small id=&quot;&#123;name&#125;-help&quot;&gt;&#123;helpText&#125;&lt;/small&gt;&#123;/if&#125;
&lt;small
id=&quot;&#123;name&#125;-validation&quot;
class=&quot;wire-next__validation&quot;
data-error=&quot;&#123;name&#125;&quot;
&gt;&#123;validationMessage&#125;&lt;/small&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.5.0</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>
}
}