Skip to content

Forms

Each example imports from @nyxwire/vue, wraps its controls in NwProvider, and hydrates when visible. Vue setup explains the styles and the provider.

Tables describe what each wrapper adds and its defaults, theme defaults included. Every component accepts a merged class (HTMLAttributes['class'], unset). Unless a table says otherwise, optional flags are false and optional values are unset. The remaining props and declared emits of each named Reka primitive pass through; use its root model with v-model and update:modelValue. Input and textarea expose their own native text model.

The family shares one look: text entry sits in a canvas-subtle well whose wire edge lights up on keyboard focus, checkboxes, switches and tags are chamfered with the cut-corner motif, and a checked choice glows in its intent ink. Controls drawn smaller than 24px keep a 24px pointer target.

NwLabel wraps Reka Label. NwInput renders an input through Primitive, or through Reka FieldControl inside NwField, so labels, descriptions, validation and field values stay connected.

@

Signed as: @nightowl

InputDemo.vue
<script setup lang="ts">
import { ref, useId } from 'vue'
import { NwInput, NwLabel, NwProvider } from '@nyxwire/vue'
const id = useId()
const handle = ref<string | number>('nightowl')
</script>
<template>
<NwProvider>
<div class="w-full max-w-sm space-y-2">
<NwLabel :for="id">Operator handle</NwLabel>
<NwInput :id="id" v-model="handle" autocomplete="nickname">
<template #leading>@</template>
</NwInput>
<p class="text-sm text-fg-muted">Signed as: @{{ handle }}</p>
</div>
</NwProvider>
</template>
Component / prop Type Default Effect
Label class HTMLAttributes['class'] unset Merged label styling; remaining LabelProps pass through
Input modelValue string | number unset Controlled value
Input defaultValue string | number '' effective fallback Initial uncontrolled value
Input type 'text' | 'email' | 'password' | 'search' | 'number' | 'tel' | 'url' 'text' Native input type
Input size 'xs' | 'sm' | 'md' | 'lg' 'md' Height: 1.75rem, 2rem, 2.5rem or 3rem
Input invalid boolean false Sets aria-invalid: danger edge and glow, no wire edge

Native attributes such as id, name, disabled, readonly, autocomplete and inputmode reach the input. The leading and trailing slots pin a non-interactive icon or text inside the edge and pad the text around it. The model emits update:modelValue with a string or number; a native number input’s text edits are still strings.

Connect NwLabel’s for to the input’s id, or use NwFieldLabel in a field. Clicking the label focuses the input. Native text editing and Tab navigation stay available. The type union deliberately leaves out native date, time and color inputs: use the date and time and color components, which look the same in every browser.

NwInputGroup wraps Reka Primitive to join inputs and NwInputGroupAddon text into one bar: inner corners square off, borders collapse and the focused input rises above its neighbours. It changes layout without replacing the input’s semantics.

https://:443
GB
InputGroupDemo.vue
<script setup lang="ts">
import { useId } from 'vue'
import { NwInput, NwInputGroup, NwInputGroupAddon, NwLabel, NwProvider } from '@nyxwire/vue'
const endpointId = useId()
const quotaId = useId()
</script>
<template>
<NwProvider>
<div class="grid w-full max-w-sm gap-4">
<div class="space-y-2">
<NwLabel :for="endpointId">Relay endpoint</NwLabel>
<NwInputGroup>
<NwInputGroupAddon>https://</NwInputGroupAddon>
<NwInput :id="endpointId" default-value="relay.nyxwire.dev" autocomplete="off" />
<NwInputGroupAddon>:443</NwInputGroupAddon>
</NwInputGroup>
</div>
<div class="space-y-2">
<NwLabel :for="quotaId">Monthly quota</NwLabel>
<NwInputGroup size="sm">
<NwInput :id="quotaId" default-value="250" inputmode="numeric" />
<template #end>GB</template>
</NwInputGroup>
</div>
</div>
</NwProvider>
</template>
<NwInputGroup>
<NwInputGroupAddon />
<NwInput />
<NwInputGroupAddon />
</NwInputGroup>
Component / prop Type Default Effect
Group size 'xs' | 'sm' | 'md' | 'lg' 'md' Height of every input in the group
Group start slot unset Shorthand: rendered in an NwInputGroupAddon before the input
Group end slot unset Shorthand: rendered in an NwInputGroupAddon after the input
Addon as PrimitiveProps['as'] 'span' Element of the addon

Remaining PrimitiveProps pass through. Addons use the mono uppercase label type. Give the input its own label: addon text is neither a label nor a description. The input stays keyboard editable.

NwTextarea renders a native textarea through Reka Primitive, or FieldControl inside a field, with three rows by default. autoResize measures the control on mount and on every change, growing it with the content.

TextareaDemo.vue
<script setup lang="ts">
import { useId } from 'vue'
import { NwLabel, NwProvider, NwTextarea } from '@nyxwire/vue'
const id = useId()
</script>
<template>
<NwProvider>
<div class="w-full max-w-sm space-y-2">
<NwLabel :for="id">Change notes</NwLabel>
<NwTextarea :id="id" auto-resize placeholder="What changed on this relay?" />
</div>
</NwProvider>
</template>
Prop Type Default Effect
modelValue string | number unset Controlled text
defaultValue string | number '' effective fallback Initial text
size 'xs' | 'sm' | 'md' | 'lg' 'md' Minimum height and type size
invalid boolean false aria-invalid
autoResize boolean false Content-driven height; disables manual resizing

It emits update:modelValue; native textarea attributes, rows included, pass through. Enter inserts a line break, so do not use it as a form-wide submit shortcut. Label the control and let Tab move to the next field.

NwField wraps Reka FieldRoot. It associates a label, a description and an error with one control, and carries name, required, invalid and disabled for the whole field. Two Nyxwire shortcuts sit on top of the parts: the label, hint and error props render the label, description and error for you, and the default slot’s control binding wires a control that does not join the field by itself.

Unique within the cluster.

relay-01 is already registered.

Where the relay runs.

FieldDemo.vue
<script setup lang="ts">
import { computed, ref } from 'vue'
import {
NwField,
NwInput,
NwProvider,
NwSelect,
NwSelectContent,
NwSelectItem,
NwSelectTrigger,
NwSelectValue,
} from '@nyxwire/vue'
const registered = ['relay-01']
const host = ref<string | number>('relay-01')
const region = ref('arc')
const hostError = computed(() =>
registered.includes(String(host.value)) ? 'relay-01 is already registered.' : undefined,
)
</script>
<template>
<NwProvider>
<div class="grid w-full max-w-md gap-5">
<NwField name="host" label="Host name" hint="Unique within the cluster." :error="hostError">
<NwInput v-model="host" autocomplete="off" />
</NwField>
<NwField v-slot="{ control }" name="region" label="Region" hint="Where the relay runs.">
<NwSelect v-model="region">
<NwSelectTrigger v-bind="control"><NwSelectValue /></NwSelectTrigger>
<NwSelectContent>
<NwSelectItem value="arc">Arc</NwSelectItem>
<NwSelectItem value="circuit">Circuit</NwSelectItem>
<NwSelectItem value="ice">Ice</NwSelectItem>
</NwSelectContent>
</NwSelect>
</NwField>
</div>
</NwProvider>
</template>

The host field shows a validation message until the name is unique: clear it or change it and the error, its aria-invalid and its description id go away. The region select renders a Reka SelectTrigger, not a FieldControl, so it takes the field’s id, name, label, description and invalid state from v-bind="control".

<NwField name="host" required>
<NwFieldLabel />
<NwInput />
<NwFieldDescription />
<NwFieldError />
</NwField>
<!-- the same field, with the shortcuts -->
<NwField name="host" required label="Host name" hint="Unique within the cluster." :error="error">
<NwInput />
</NwField>
Component / prop Type Default Effect
Field orientation 'horizontal' | 'vertical' 'vertical' Column, or a wrapping row with the control beside its label
Field label string unset Renders an NwFieldLabel before the control
Field hint string unset Renders an NwFieldDescription after the control
Field error string unset Marks the field invalid and renders the message in NwFieldError
Field invalid boolean false Marks the field invalid without a message

Remaining FieldRootProps pass through. NwFieldLabel appends a glowing * (hidden from assistive technology) when the field is required, and turns danger while it is invalid. NwFieldError lists every message when there are several and shows only while the field is invalid.

The default slot receives { invalid, errors, control }. control holds id, name, disabled, required, aria-labelledby, aria-describedby and aria-invalid; it is empty outside a field. NwInput and NwTextarea join the field without it and drop a duplicate binding if you pass one. In your own components, useNwFieldControl() returns the same attributes as a computed ref:

import { useNwFieldControl } from '@nyxwire/vue'
const control = useNwFieldControl() // bind on the focusable element: v-bind="control"

NwForm wraps Reka FormRoot to collect named fields, validate on submit and focus the first invalid control.

Shown on the cluster map.

FormDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwButton,
NwField,
NwFieldDescription,
NwFieldError,
NwFieldLabel,
NwForm,
NwInput,
NwProvider,
} from '@nyxwire/vue'
const saved = ref('')
function onSubmit(values: Record<string, unknown>) {
saved.value = `Node ${String(values['node'])} registered.`
}
</script>
<template>
<NwProvider>
<NwForm class="w-full max-w-sm" @form-submit="onSubmit">
<NwField name="node" required>
<NwFieldLabel>Node name</NwFieldLabel>
<NwInput autocomplete="off" placeholder="hel-01" />
<NwFieldDescription>Shown on the cluster map.</NwFieldDescription>
<NwFieldError />
</NwField>
<NwButton type="submit" intent="primary" variant="solid" class="justify-self-start">
Register node
</NwButton>
<p v-if="saved" role="status" class="m-0 text-sm text-success">{{ saved }}</p>
</NwForm>
</NwProvider>
</template>
<NwForm @form-submit="save">
<NwField name="node" required>
<NwFieldLabel />
<NwInput />
<NwFieldDescription />
<NwFieldError />
</NwField>
<NwButton type="submit" />
</NwForm>
Prop Type Default Effect
layout 'stacked' | 'inline' | 'columns' 'stacked' One column, a wrapping row, or two columns from the sm breakpoint

Remaining FormRootProps and declared form emits pass through. formSubmit receives the valid named values; listen with @form-submit as shown. Without a @form-submit listener the native submit goes through, so a plain action URL keeps working.

Submit the empty form: the node field turns invalid, its error appears, and focus moves to it. Typing a name clears the error. Disabled fields disable their native controls. This validation is feedback for the user; the server still owns acceptance of the data.

NwCheckbox composes Reka CheckboxRoot and CheckboxIndicator in a chamfered box: a check when checked, a dash when indeterminate. NwCheckboxGroup wraps CheckboxGroupRoot for a collection of selected values.

Enabled: latency

CheckboxDemo.vue
<script setup lang="ts">
import { computed, ref } from 'vue'
import { NwCheckbox, NwCheckboxGroup, NwProvider } from '@nyxwire/vue'
const alerts = ['latency', 'loss', 'faults'] as const
const enabled = ref<string[]>(['latency'])
const allEnabled = computed(() =>
enabled.value.length === 0
? false
: enabled.value.length === alerts.length
? true
: 'indeterminate',
)
function toggleAll(value: boolean | 'indeterminate') {
enabled.value = value === true ? [...alerts] : []
}
</script>
<template>
<NwProvider>
<div class="grid gap-3">
<NwCheckbox :model-value="allEnabled" label="Every alert" @update:model-value="toggleAll" />
<NwCheckboxGroup v-model="enabled" aria-label="Alerts" class="ps-6">
<NwCheckbox value="latency" label="Latency above 100 ms" />
<NwCheckbox value="loss" label="Packet loss" intent="warning" />
<NwCheckbox value="faults" label="Hardware faults" intent="danger" />
</NwCheckboxGroup>
<p class="m-0 text-sm text-fg-muted">Enabled: {{ enabled.join(', ') || 'none' }}</p>
</div>
</NwProvider>
</template>
<NwCheckboxGroup>
<NwCheckbox value="latency" label="Latency above 100 ms" />
<NwCheckbox value="loss" label="Packet loss" />
</NwCheckboxGroup>
Component / prop Type Default Effect
Checkbox size 'sm' | 'md' | 'lg' 'md' 16px, 18px or 22px box
Checkbox intent 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' 'primary' Checked fill and glow
Checkbox invalid boolean false aria-invalid, danger edge
Checkbox label string unset Renders a visible label after the box, tied to it by for
Group orientation 'horizontal' | 'vertical' vertical Column, or a wrapping row

Checkbox uses Reka’s modelValue and defaultValue, 'indeterminate' included, announced as aria-checked="mixed". The demo derives the parent’s mixed state from the group: clicking it checks or clears every alert. The default slot replaces the mark and receives Reka’s state.

Space toggles an enabled checkbox; clicking its label does too. Group items need distinct values. A group’s aria-label names the set, not each checkbox: give every box a label, a wrapping label or an aria-label. Disabled checkboxes cannot toggle and their label dims.

NwRadioGroup wraps Reka RadioGroupRoot; NwRadioGroupItem composes RadioGroupItem, RadioGroupIndicator and a label for its text slot. The checked ring keeps a dark face and glows around a lit core.

Policy: latency

RadioGroupDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwProvider, NwRadioGroup, NwRadioGroupItem } from '@nyxwire/vue'
const routing = ref('latency')
</script>
<template>
<NwProvider>
<div class="grid gap-3">
<NwRadioGroup v-model="routing" label="Routing policy">
<NwRadioGroupItem value="latency">Lowest latency</NwRadioGroupItem>
<NwRadioGroupItem value="cost" intent="secondary">Lowest cost</NwRadioGroupItem>
<NwRadioGroupItem value="pinned" disabled>Pinned route</NwRadioGroupItem>
</NwRadioGroup>
<p class="m-0 text-sm text-fg-muted">Policy: {{ routing }}</p>
</div>
</NwProvider>
</template>
<NwRadioGroup label="Routing policy">
<NwRadioGroupItem value="latency">Lowest latency</NwRadioGroupItem>
<NwRadioGroupItem value="cost">Lowest cost</NwRadioGroupItem>
</NwRadioGroup>
<!-- or from data -->
<NwRadioGroup label="Routing policy" :options="[{ value: 'latency', label: 'Lowest latency' }]" />
Component / prop Type Default Effect
Group label string unset Accessible name of the group
Group options readonly NwOption[] unset { value, label, disabled? } items, rendered when the slot is empty
Group orientation 'horizontal' | 'vertical' vertical Column, or a wrapping row
Item size 'sm' | 'md' | 'lg' 'md' Ring and core dimensions
Item intent 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' 'primary' Selected ring, core and glow
Item invalid boolean false aria-invalid, danger ring

Remaining RadioGroupRootProps and emits pass through; the item’s label slot overrides its default slot. Tab enters the group on the selected radio. The arrow keys move focus and select the radio they land on, skipping disabled ones; Reka’s roving focus alone would only move focus, so the group selects on arrow keys itself. Use v-model for the selected value, and label, aria-label or aria-labelledby for the question.

NwSwitch wraps Reka SwitchRoot and supplies SwitchThumb: a chamfered track with a square thumb, filled and glowing in the intent ink when on.

Telemetry is streaming.

SwitchDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwProvider, NwSwitch } from '@nyxwire/vue'
const telemetry = ref(true)
</script>
<template>
<NwProvider>
<div class="grid gap-2">
<NwSwitch v-model="telemetry" label="Live telemetry" />
<NwSwitch label="Maintenance lock" intent="warning" disabled />
<p class="m-0 text-sm text-fg-muted">
Telemetry is {{ telemetry ? 'streaming' : 'paused' }}.
</p>
</div>
</NwProvider>
</template>
Prop Type Default Effect
size 'sm' | 'md' | 'lg' 'md' Track and thumb dimensions
intent 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' 'primary' On-state fill and glow
invalid boolean false aria-invalid, danger edge
label string unset Renders a visible label after the switch

Remaining SwitchRootProps and emits pass through. v-model is the on/off value; Space or a click on the label toggles it and updates aria-checked. The thumb travels the other way under dir="rtl" and does not animate under reduced motion. Name the setting, not its current state: “Live telemetry”, not “Telemetry on”.

NwSlider wraps Reka SliderRoot and supplies a sunken track, a wire-gradient range and one glowing diamond thumb per value. Its default slot can replace that composition.

Uplink gain: 40

Latency window: 20 to 80 ms

SliderDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwProvider, NwSlider } from '@nyxwire/vue'
const gain = ref<number[]>([40])
const latency = ref<number[]>([20, 80])
</script>
<template>
<NwProvider>
<div class="grid w-full max-w-sm gap-5">
<div class="grid gap-2">
<p class="m-0 text-sm text-fg-muted">Uplink gain: {{ gain[0] }}</p>
<NwSlider v-model="gain" label="Uplink gain" />
</div>
<div class="grid gap-2">
<p class="m-0 text-sm text-fg-muted">
Latency window: {{ latency[0] }} to {{ latency[1] }} ms
</p>
<NwSlider
v-model="latency"
:step="5"
:thumb-labels="['Minimum latency', 'Maximum latency']"
/>
</div>
</div>
</NwProvider>
</template>
Prop Type Default Effect
size 'sm' | 'md' | 'lg' 'md' Track and thumb dimensions
label string unset Names an unnamed thumb; a range numbers its thumbs after it (Gain 1, Gain 2)
thumbLabels readonly string[] unset Each thumb’s accessible name, in order; wins over label

Without either, thumbs are named Value 1, Value 2 and so on. Remaining SliderRootProps and emits pass through, min, max, step and orientation included. The model is an array, even for one thumb; give a range two values, as the demo does. Arrow keys step the focused thumb, Page Up and Page Down take bigger steps, and Home and End jump to the bounds. Each thumb exposes aria-valuenow. A disabled slider removes its thumbs from the tab order. Keep a numeric field next to it when exact entry matters.

NwNumberField wraps Reka NumberFieldRoot and supplies decrement, input and increment parts by default. Compose the exported parts yourself when their order or labels need to change; a nested input inherits the root’s size.

3 of 9 replicas

NumberFieldDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwNumberField, NwProvider } from '@nyxwire/vue'
const replicas = ref(3)
</script>
<template>
<NwProvider>
<div class="grid w-full max-w-xs gap-2">
<NwNumberField v-model="replicas" label="Replicas" :min="1" :max="9" />
<p class="m-0 text-sm text-fg-muted">{{ replicas }} of 9 replicas</p>
</div>
</NwProvider>
</template>
<NwNumberField>
<NwNumberFieldDecrement />
<NwNumberFieldInput />
<NwNumberFieldIncrement />
</NwNumberField>
Component / prop Type Default Effect
Root size 'xs' | 'sm' | 'md' | 'lg' 'md' Input height, inherited by a nested input
Root label string 'Value' Group and default input accessible name
Root invalid boolean false aria-invalid on the default input
Decrement / Increment label string 'Decrease' / 'Increase' Button accessible names

Remaining NumberFieldRootProps and emits pass through, bounds, step, formatOptions and the numeric v-model included. The input uses tabular mono digits and the spinbutton role. ArrowUp and ArrowDown step the value, Home and End use the configured min and max, and a button disables itself at its bound. With a custom composition, label the input and carry its invalid state yourself.

NwPinInput wraps Reka PinInputRoot. Add one NwPinInputInput per character, with zero-based indexes; a filled cell keeps a primary edge.

Enter the code shown on the device.

PinInputDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import { NwPinInput, NwPinInputInput, NwProvider } from '@nyxwire/vue'
const code = ref<string[]>([])
const complete = ref(false)
</script>
<template>
<NwProvider>
<div class="grid gap-3">
<NwPinInput
v-model="code"
aria-label="Pairing code"
placeholder="-"
otp
@update:model-value="complete = false"
@complete="complete = true"
>
<NwPinInputInput
v-for="index in 4"
:key="index"
:index="index - 1"
:aria-label="`Pairing code digit ${index}`"
/>
</NwPinInput>
<p class="m-0 text-sm text-fg-muted" role="status">
{{
complete ? `Pairing with code ${code.join('')}` : 'Enter the code shown on the device.'
}}
</p>
</div>
</NwProvider>
</template>
<NwPinInput>
<NwPinInputInput :index="0" />
<NwPinInputInput :index="1" />
</NwPinInput>
Component / prop Type Default Effect
Root class HTMLAttributes['class'] unset Root styling; PinInputRootProps and emits pass through
Input size 'xs' | 'sm' | 'md' | 'lg' 'md' Character cell dimensions

Entering a character moves focus to the next cell, Backspace goes back, and pasting fills every cell. The root’s complete event fires when the last cell is filled, as the demo shows. mask switches to password inputs, type="number" accepts digits only, otp enables one-time-code autofill, and disabled reaches every cell. Name the group and each cell. A PIN UI is not an authentication boundary on its own.

NwTagsInput wraps Reka TagsInputRoot for editing a list of values. Text, delete and clear parts keep the chamfered tags tied to the root model; the box takes the wire edge while its input has focus.

eu-north
us-east
TagsInputDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwProvider,
NwTagsInput,
NwTagsInputClear,
NwTagsInputInput,
NwTagsInputItem,
NwTagsInputItemDelete,
NwTagsInputItemText,
} from '@nyxwire/vue'
const regions = ref(['eu-north', 'us-east'])
</script>
<template>
<NwProvider>
<NwTagsInput v-model="regions" class="w-full max-w-sm">
<NwTagsInputItem v-for="region in regions" :key="region" :value="region">
<NwTagsInputItemText /><NwTagsInputItemDelete :label="`Remove ${region}`" />
</NwTagsInputItem>
<NwTagsInputInput aria-label="Failover regions" placeholder="Add a region, then Enter" />
<NwTagsInputClear />
</NwTagsInput>
</NwProvider>
</template>
<NwTagsInput>
<NwTagsInputItem value="eu-north">
<NwTagsInputItemText />
<NwTagsInputItemDelete />
</NwTagsInputItem>
<NwTagsInputInput />
<NwTagsInputClear />
</NwTagsInput>
Component / prop Type Default Effect
Root size 'sm' | 'md' | 'lg' 'md' Box and type dimensions
ItemDelete label string 'Remove tag' Delete control name
Clear label string 'Clear tags' Clear control name

Remaining generic TagsInputRootProps<T> and emits pass through; T is string by default and can also be a number, a bigint or a record. Enter adds the typed tag, and delimiter or addOnPaste add more ways in. Backspace in an empty input selects the last tag and a second Backspace removes it; the arrow keys move between tags. The delete part removes its value and Clear empties the model; both disable with the root. Give removals value-specific names, as the demo does, and label the text input separately from its placeholder.

NwEditable wraps Reka EditableRoot for an inline preview/edit cycle. Its exported area, preview, input and trigger parts make the edit and commit controls explicit.

North relay
EditableDemo.vue
<script setup lang="ts">
import {
NwEditable,
NwEditableArea,
NwEditableCancelTrigger,
NwEditableEditTrigger,
NwEditableInput,
NwEditablePreview,
NwEditableSubmitTrigger,
NwProvider,
} from '@nyxwire/vue'
</script>
<template>
<NwProvider>
<NwEditable
default-value="North relay"
activation-mode="none"
submit-mode="enter"
role="group"
aria-label="Relay name editor"
class="w-full max-w-sm"
>
<NwEditableArea class="basis-full">
<NwEditablePreview class="[&[hidden]]:hidden" />
<NwEditableInput label="Relay name" class="[&[hidden]]:hidden" />
</NwEditableArea>
<NwEditableEditTrigger class="[&[hidden]]:hidden" />
<NwEditableSubmitTrigger class="[&[hidden]]:hidden" />
<NwEditableCancelTrigger class="[&[hidden]]:hidden" />
</NwEditable>
</NwProvider>
</template>
<NwEditable>
<NwEditableArea>
<NwEditablePreview />
<NwEditableInput />
</NwEditableArea>
<NwEditableEditTrigger />
<NwEditableSubmitTrigger />
<NwEditableCancelTrigger />
</NwEditable>
Component / prop Type Default Effect
Root class HTMLAttributes['class'] unset Root styling; EditableRootProps and emits pass through
Input size 'xs' | 'sm' | 'md' | 'lg' 'md' Editor dimensions
Input label string 'Editable text' Input accessible name
Edit / Submit / Cancel trigger label string 'Edit' / 'Submit' / 'Cancel' Accessible name and fallback text

The demo sets activation-mode="none" and submit-mode="enter", so only the Edit button starts editing and Enter commits. Reka hides the parts that do not apply with the hidden attribute; the parts set their own display, so add [&[hidden]]:hidden as shown to keep them hidden. Edit starts entry and focuses the input, Submit or Enter commits, and Cancel or Escape restores the previous value. Name the editor after the record it changes.

NwTagGroup wraps Reka TagGroupRoot for selecting and removing existing tags. Unlike tags input, it has no text entry. A selected tag lights its cut edge and fills with the soft primary.

hel-01
fra-02
ams-03

Draining: hel-01

TagGroupDemo.vue
<script setup lang="ts">
import { ref } from 'vue'
import {
NwProvider,
NwTagGroup,
NwTagGroupItem,
NwTagGroupItemDelete,
NwTagGroupItemText,
} from '@nyxwire/vue'
const nodes = ref(['hel-01', 'fra-02', 'ams-03'])
const selected = ref<string[]>(['hel-01'])
function remove(values: unknown[]) {
nodes.value = nodes.value.filter((node) => !values.includes(node))
selected.value = selected.value.filter((node) => !values.includes(node))
}
</script>
<template>
<NwProvider>
<div class="grid gap-3">
<NwTagGroup
v-model="selected"
selection-mode="multiple"
aria-label="Drained nodes"
@remove="remove"
>
<NwTagGroupItem v-for="node in nodes" :key="node" :value="node" :text-value="node">
<NwTagGroupItemText>{{ node }}</NwTagGroupItemText>
<NwTagGroupItemDelete :label="`Remove ${node}`" />
</NwTagGroupItem>
</NwTagGroup>
<p class="m-0 text-sm text-fg-muted">Draining: {{ selected.join(', ') || 'none' }}</p>
</div>
</NwProvider>
</template>
<NwTagGroup>
<NwTagGroupItem value="hel-01">
<NwTagGroupItemText />
<NwTagGroupItemDelete />
</NwTagGroupItem>
</NwTagGroup>
Component / prop Type Default Effect
Root class HTMLAttributes['class'] unset Root styling; remaining TagGroupRootProps and emits pass through
ItemDelete label string 'Remove' Delete control name

The root model holds the selected values; selection-mode is 'single' or 'multiple'. Tags are removable only while the root has a @remove listener, and the event hands you the values to drop from your own list, as in the demo. The arrow keys move between tags, Space or Enter toggles the selection, and Delete or Backspace removes the focused tag. Label the group, give each item readable text with text-value, and disable locked tags instead of hiding them.

  • Every control needs a name: NwLabel with for, an NwField label, a label prop or an aria-label.
  • Inside NwField, descriptions and errors join aria-describedby automatically, and an invalid field sets aria-invalid on its control.
  • Focus is always visible: a 2px ring in --nw-ring, plus the wire edge and glow on text entry.
  • Disabled controls dim and stop responding, and their labels switch to the disabled ink.
  • Motion (thumb travel, glows, transitions) stops under prefers-reduced-motion: reduce.