United Kingdom National Insurance Number Input

an input for entering United Kingdom's National Insurance Number (NINO)

This is a new component. See the canonical documentation for full details.

Example

Show demo markup
<label class="label" for="demo-input">Label</label><input class="united-kingdom-national-insurance-number-input" id="demo-input" aria-label="an input for entering United Kingdom's National Insurance Number (NINO)" />
Usage example
<Field
  label="National Insurance Number"
  required
>
  <UnitedKingdomNationalInsuranceNumberInput
    label="National Insurance Number"
    value="{value}"
    required
  />
  <Hint>two prefix letters, six digits, and a suffix letter (A, B, C, or D) — e.g. AB123456A</Hint>
  <ErrorMessage>Please enter a valid National Insurance Number</ErrorMessage>
</Field>
Show Svelte source
// In your Svelte component:
import UnitedKingdomNationalInsuranceNumberInput from "lily-design-system-svelte-headless/components/UnitedKingdomNationalInsuranceNumberInput/UnitedKingdomNationalInsuranceNumberInput.svelte";

<UnitedKingdomNationalInsuranceNumberInput label="Label" />

Canonical contract

Generated from this component's canonical metadata — the machine-checked source the implementations are held to.

Metadata

  • Component: united-kingdom-national-insurance-number-input
  • PascalCase: UnitedKingdomNationalInsuranceNumberInput
  • Description: an input for entering United Kingdom's National Insurance Number (NINO)
  • Purpose: Collects United Kingdom's National Insurance Number (NINO) in one field, with autocomplete and spellcheck off so the number is neither saved by the browser nor sent to a spellchecker. Use it where staff or the person enter that number.
  • Status: beta — implemented and unit-tested in all seven frameworks with an axe-clean demo page; not yet exercised in composed flows
  • HTML tag: <input>
  • CSS class: .united-kingdom-national-insurance-number-input
  • Interactive: yes

ARIA

  • aria-label provides accessible name from label prop
  • required and disabled states conveyed to assistive technology
  • aria-label provided from the label prop

Keyboard

  • Standard text input keyboard behavior

Props

  • label: string (required) — accessible label via aria-label
  • value: string (default: "") — bindable input value
  • required: boolean (default: false) — form validation
  • disabled: boolean (default: false) — disabled state
  • ...restProps: any additional HTML attributes spread onto the root

Markdown

This page as Markdown, for people and AI tools: united-kingdom-national-insurance-number-input.md