Components

Autocomplete

An input field with suggestions dropdown.

Installation

NPM packages are currently unstable and may cause issues. Use it at your own risk.
npm install @mijn-ui/react-autocomplete

Usage

import {
  Autocomplete,
  AutocompleteContent,
  AutocompleteGroup,
  AutocompleteItem,
  AutocompleteTrigger,
} from "@mijn-ui/react"
<Autocomplete>
  <AutocompleteTrigger placeholder={"Search for a framework"} />
  <AutocompleteGroup>
    <AutocompleteContent>
      <AutocompleteItem value="nextjs">Next.js</AutocompleteItem>
    </AutocompleteContent>
  </AutocompleteGroup>
</Autocomplete>

Examples

Autocomplete With Scrollarea

Autocomplete With Dialog


Autocomplete Style Slots

Slot NameTargeted ComponentPurpose
baseAutoCompleteStyles the root AutoComplete component.
triggerAutoCompleteStyles the trigger for the autocomplete.
contentAutoCompleteContentApplies styles to the content container.
contentEmptyAutoCompleteContentStyles the content when no results are available.
skeletonAutoCompleteContentStyles the skeleton/loading state of content.
groupAutoCompleteGroupStyles groups of autocomplete items.
itemAutoCompleteItemStyles individual autocomplete items.

On this page