---
title: Select filter
description: Filter data with one or more declared choices.
---

A select filter accepts values from a fixed list. Each option has a protocol
value and a display label. Backlit ignores a value that is not in the declared
options.

## API

```ts
filters.select(name: string, options: FilterOption[]): SelectFilterBuilder
```

| Method           | Input             | Result                               |
| ---------------- | ----------------- | ------------------------------------ |
| `setLabel`       | `string`          | Sets the filter-control label.       |
| `setCardinality` | `"one" \| "many"` | Selects one value or several values. |

The default cardinality is `one`. The SDK does not include it in protocol
output unless you set it.

## Single value

Declare each allowed value and its display label.

<BacklitExample path="filters/select/basic" view="list" />

## Multiple values

Use the `many` cardinality to accept several declared values. Backlit keeps
valid members and removes invalid members from the parsed array.

<BacklitExample path="filters/select/multiple" view="list" />
