k8ordo
  • UI
  • Form
  • State
  • Router
  • Static
  • Server
Switch to dark mode
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI
Open navigation
Buttons
  • Button
  • IconButton
Navigation
  • Anchor
  • Tabs
  • Breadcrumb
  • Pagination
Forms
  • TextField
  • Textarea
  • NumberField
  • Select
  • Checkbox
  • CheckboxCard
  • CheckboxGroup
  • Switch
  • PasswordInput
  • Radio
  • RadioCard
  • Autocomplete
  • Slider
  • FileField
  • FormControl
  • Form
Data Display
  • Accordion
  • Avatar
  • Badge
  • Card
  • Code
  • Table
  • Heading
Feedback
  • Alert
  • Skeleton
  • Spinner
  • Toast
  • Progress
Overlays
  • Dialog
  • Drawer
  • Modal
  • Popover
  • DropdownMenu
  • Tooltip
  • ListBox
Layout
  • Stack
  • Grid
  • Separator
  • ScrollLinked
Media
  • Icons
k8ordo

React libraries that use Baseline features without holding back.

Packages
  • @k8ordo/ui
  • @k8ordo/form
  • @k8ordo/state
  • @k8ordo/router
  • @k8ordo/static
  • @k8ordo/server
UI
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI Chat
  • Generative UI
  • AI Agents
  • Storybook
Resources
  • GitHub
  • npm

© 2026 k8o — MIT License

Typeset in Noto Sans JP & M PLUS 2

Components

Buttons
  • Button
  • IconButton
Navigation
  • Anchor
  • Tabs
  • Breadcrumb
  • Pagination
Forms
  • TextField
  • Textarea
  • NumberField
  • Select
  • Checkbox
  • CheckboxCard
  • CheckboxGroup
  • Switch
  • PasswordInput
  • Radio
  • RadioCard
  • Autocomplete
  • Slider
  • FileField
  • FormControl
  • Form
Data Display
  • Accordion
  • Avatar
  • Badge
  • Card
  • Code
  • Table
  • Heading
Feedback
  • Alert
  • Skeleton
  • Spinner
  • Toast
  • Progress
Overlays
  • Dialog
  • Drawer
  • Modal
  • Popover
  • DropdownMenu
  • Tooltip
  • ListBox
Layout
  • Stack
  • Grid
  • Separator
  • ScrollLinked
Media
  • Icons

Autocomplete

A selection component with autocomplete.

View in Storybook

Import

Usage

Required

Multiple Selection

Apple
Remove tag
Cherry
Remove tag
Clear all

Disabled

Apple
Remove tag
Clear all

Invalid

Props

id
Type: string
Default: -
options
Type: readonly Option[]
Default: -
defaultValue?
Type: never
Default: -
invalid?
Type: boolean
Default: false
onChange?
Type: (value: string[]) => void
Default: -
ref?
Type: Ref<HTMLInputElement>
Default: -
value?
Type: string[]
Default: -
PropTypeDefault
idstring-
optionsreadonly Option[]-
defaultValue?never-
invalid?booleanfalse
onChange?(value: string[]) => void-
ref?Ref<HTMLInputElement>-
value?string[]-

Props whose default is messages.* fall back to the message dictionary. To change them, see: i18n

import { Autocomplete } from '@k8ordo/ui';
const [value, setValue] = useState<string[]>([]);

const options = [
  { label: 'Apple', value: 'apple' },
  { label: 'Banana', value: 'banana' },
  { label: 'Cherry', value: 'cherry' },
  { label: 'Grape', value: 'grape' },
  { label: 'Orange', value: 'orange' },
];

<Autocomplete
  id="autocomplete-basic"
  aria-describedby={undefined}
  disabled={false}
  invalid={false}
  required={false}
  onChange={setValue}
  options={options}
  value={value}
/>
<Autocomplete
  id="autocomplete-required"
  aria-describedby={undefined}
  disabled={false}
  invalid={false}
  required
  onChange={setValue}
  options={options}
  value={value}
/>
const [value, setValue] = useState<string[]>(['apple', 'cherry']);

<Autocomplete
  id="autocomplete-multiple"
  aria-describedby={undefined}
  disabled={false}
  invalid={false}
  required={false}
  onChange={setValue}
  options={options}
  value={value}
/>
<Autocomplete
  id="autocomplete-disabled"
  aria-describedby={undefined}
  disabled
  invalid={false}
  required={false}
  onChange={setValue}
  options={options}
  value={['apple']}
/>
<Autocomplete
  id="autocomplete-invalid"
  aria-describedby={undefined}
  disabled={false}
  invalid
  required={false}
  onChange={setValue}
  options={options}
  value={value}
/>