Balance Logo
Balance
Reckon Design System
Open playroom

Autocomplete

Autocompletes allow users to search through a set of options fetched over the network based on their input
Install
pnpm add @balance-web/autocomplete
Import usage
import {
Autocomplete,
AutocompleteField,
entityDetailOptionRenderer,
entityOptionRenderer,
userOptionRenderer
} from '@balance-web/autocomplete';
  • Code
  • API

Alternatives

  • Combobox — Allows the user to browse, search, and make a single selection from a large list of values.
  • SelectInput — For small lists.

Usage

The Autocomplete has no opinions about what you do when an option is selected.

Edit in Playroom

disabled

Disables the autocomplete.

Selecting options

You may want to show the option that the user selected when they are inside a form. You can use value to do this.

AutocompleteField

If you're using the Autocomplete inside a form, you should use the AutocompleteField component. This accepts similar props to other Field components.

Option renderers

You can provide a render function to renderOption to render options in a different way. Three default render functions are exported for various use cases.

Users

Entities

Entity Details

Copyright © 2024 Reckon. Designed and developed in partnership with Thinkmill.
Bitbucket logoJira software logoConfluence logo