Autocomplete
An Input providing a popover list of suggestions as the user types.
Code
<script lang="ts">
import { Input } from '@geoffcox/sterling-svelte';
</script>
<Input bind:value />
Members
| Property Name | Type | Default | Comment |
---|
| values | string[] | undefined | [] |
| item | Snippet<[string]> | undefined | undefined |
| filter | (values: string[], text: string) => string[] | undefined | undefined |
Considerations
- HTMLInputElement props are forwarded to the Input component.
- Includes HTMLInputElement props, events, and methods.
Anatomy
<div class="sterling-autocomplete">
<Input />
<Popover>
<div class="sterling-autocomplete-content">
<List class="composed">
<!-- <ListItem> ... -->
</List>
</div>
</Popover>
</div>