Select lets users choose one option from an options' menu. Consider select when you have 4 or more options, to void cluttering the interface.
<script lang="ts" setup>
import { Select, SelectGroup, SelectOption } from '@returnless/focus-ui';
</script>
<template>
<Select label="Select a fruit" placeholder="Select a fruit">
<SelectOption>Apple</SelectOption>
<SelectOption>Banana</SelectOption>
<SelectGroup label="Other fruits">
<SelectOption>Blueberry</SelectOption>
<SelectOption>Grapes</SelectOption>
<SelectOption>Pineapple</SelectOption>
</SelectGroup>
</Select>
</template>The select component should:
Label should:
Options should: