# FilterLinks

> A row of links that narrow one list, such as a feed filtered by post type, each a part with an optional count and the current one marked with `aria-current="page"`.

```ts
import { FilterLinks } from "@sdxc/ui";
```

Renders a `<nav>` holding one line of filter links. On a screen too narrow for every filter
the line scrolls sideways with its scrollbar hidden, or wraps onto more lines with `wrap`.
Restyle every link at once by setting FilterLinks.CustomProperties on the root.

## Examples

```tsx
<FilterLinks aria-label="Filter by type">
	<FilterLinks.Link href="/" current>Everything <FilterLinks.Count>42</FilterLinks.Count></FilterLinks.Link>
	<FilterLinks.Link href="/?type=notes">Notes <FilterLinks.Count>17</FilterLinks.Count></FilterLinks.Link>
</FilterLinks>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `wrap?` | `boolean` | Wraps the links onto more lines on a narrow screen, in place of scrolling sideways. |

Also accepts everything in `TagProps<"nav">`.


### FilterLinks.Link

One filter as a list item holding its link; the current one is announced as the current page.

Takes no props of its own.

### FilterLinks.Count

How many entries the filter keeps, after its label in tabular figures and a little quieter.

Also accepts everything in `TagProps<"span">`.

