Exported components
LiteFilter AI
A LiteFilter is a row of pills that filters content, such as search results. When the pills do not fit, the row scrolls and an arrow shows on each side that hides pills.
Usage
<script>
import { LiteFilter, LiteFilterItem } from 'fluentui-svelte';
let filter = $state('all');
</script>
<LiteFilter aria-label="Search filters" bind:selectedValue={filter}>
<LiteFilterItem value="all">All</LiteFilterItem>
<LiteFilterItem value="apps">Apps</LiteFilterItem>
<LiteFilterItem value="documents">Documents</LiteFilterItem>
</LiteFilter> Overflow
Give the filter a width, or a container with one. The arrows show only toward the hidden pills: none when every pill fits, then the next arrow, both in the middle and the previous arrow at the end.
allFiltering results
One pill is selected at a time, like a radio group. Bind selectedValue and filter the content with it. size and appearance style every pill.
- Budget 2026.xlsx
- Fluent UI
- Calculator
- Ada Lovelace
- Notes.docx
- Svelte docs
Multiple selection
multiple lets several pills be selected, and none: selectedValue becomes an array. Each item takes an icon and disabled.
documentsForms and labels
Wrap the filter in a Label to give it a visible name: the Label names the whole group, which then needs no aria-label. With name, the selection submits with the form: one value for a single filter, one entry per selected pill with multiple. Outside the form, point form at its id.
nothing yetKeyboard and accessibility
The filter is a radiogroup of radios, or a group of checkboxes with multiple. Tab moves through the pills and scrolls the focused one into view, Space selects. The arrows stay off the tab order. Name the filter with a Label around it or aria-label, and localize previousLabel and nextLabel.
Component Props
LiteFilter
| Name | Type | Default | Description |
|---|---|---|---|
ref bindable | HTMLDivElement | null | The DOM reference of the root element. | |
selectedValue bindable | string | string[] | The value of the selected item, or the values of the selected items when multiple is set. | |
multiple | boolean | Lets more than one item be selected, and none. A selection kept across a change of mode takes the new shape: the first value, or an array. | |
name | string | The field name shared by every item. | |
form | string | The id of the form that owns the items, when outside that form. | |
disabled | boolean | Disables every item. | |
size | 'small' | 'medium' | 'large' | 'extra-large' | 'medium' | The height and text size of the pills. |
appearance | 'filled' | 'outline' | 'brand' | 'filled' | The appearance of the pills. |
onSelectionChange | (event: Event, value: string | string[]) => void | Fired when user interaction changes the selection. | |
previousLabel | string | 'Scroll back' | Accessible name of the button that scrolls back. |
nextLabel | string | 'Scroll forward' | Accessible name of the button that scrolls forward. |
disableTabspot | boolean | Disables tabspot keyboard navigation. | |
children | Snippet | The items of the filter. | |
HTMLAttributes<HTMLDivElement> without children |
LiteFilterItem
| Name | Type | Default | Description |
|---|---|---|---|
ref bindable | HTMLInputElement | null | The DOM reference of the native input. | |
value | string | A unique value identifying this item within its filter. | |
icon | Snippet<[SVGAttributes<SVGElement>]> | Component<SVGAttributes<SVGElement>> | An optional decorative Fluent icon before the label. | |
disabled | boolean | Disables this item. | |
children | Snippet | The label of the item. |

