Skip to main content

LicensePlateInput

packages/mobility/components/atoms/LicensePlateInput.js · Tier: atom · Module: mobility · Rendering: Client Component ('use client')

Purpose​

A visual recreation of an EU-style license-plate input. The left strip mimics the blue EU band with the country code; the right portion is a free-text input that automatically uppercases its value. Purely presentational — the value/onChange API mirrors a native <input>.

Props​

PropTypeRequiredDefaultDescription
valuestringyes—Controlled value.
onChange(next: string) => voidyes—Called with the uppercased value.
placeholderstringno'1234 ABC'Input placeholder.
countryCodestringno'E'Country letter in the EU band.
maxLengthnumberno16Max characters.
disabledbooleannofalseDisables the input.
errorbooleannofalseApplies the error ring + aria-invalid.
idstringno(auto)Input id (falls back to useId).
aria-labelstringno—Accessible name for the input.

Composition​

  • Uses: native <input> (+ useId); an <abbr title="European Union"> in the band.
  • Used by: molecules/mobility/AddCarModal, organisms/mobility/ReservationForm, organisms/mobility/CreateSanctionForm.

Internationalisation​

None (label supplied by the caller).

Accessibility​

The value uppercases automatically (autoCapitalize="characters"); the wrapper paints a high-contrast focus-within ring while the inner input uses focus:outline-none (SC 2.4.7 / 2.4.11 / 2.4.13); aria-invalid is set on error.

Styling & tokens​

h-12 plate, bg-blue-700 EU band, border-outline-variant / border-error, text-h3 tracking-widest.

molecules/mobility/AddCarModal, atoms/core/FormField.