> ## Documentation Index
> Fetch the complete documentation index at: https://api.fanvue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# FilterMenu

> A menu of options under a trigger you supply, where several can be ticked.

```tsx theme={null}
import { FilterMenu } from "@fanvue/ui";
import type { FilterMenuOption, FilterMenuProps } from "@fanvue/ui";
```

## Examples

## Default

[FilterMenu — Default](https://main--697a1b6dd4dad73ee9c0e5f5.chromatic.com/iframe.html?id=components-filtermenu--default\&viewMode=story\&shortcuts=false\&singleStory=true\&globals=theme:light)

```tsx theme={null}
import * as React from "react";
import { ChevronDownIcon, FilterMenu, TableToolbarAction } from "@fanvue/ui";
import type { FilterMenuOption } from "@fanvue/ui";

const PLATFORMS: FilterMenuOption[] = [
  { value: "instagram", label: "Instagram" },
  { value: "youtube", label: "YouTube" },
  { value: "tagged", label: "Tagged links" },
];

function Example() {
  const [value, setValue] = React.useState(["instagram"]);
  return (
    <FilterMenu
      options={PLATFORMS}
      value={value}
      onValueChange={setValue}
      contentProps={{ "aria-label": "Platform" }}
    >
      {<TableToolbarAction icon={<ChevronDownIcon size={16} />}>Platform</TableToolbarAction>}
    </FilterMenu>
  );
}
```

## Props

## FilterMenu

A menu of options under a trigger you supply, where several can be ticked. Each tick calls `onValueChange` at once and the menu stays open, so several can be ticked in one go. It holds no state: pass `value` back in. The ref goes to the menu content.

Keyboard support comes from the menu: arrow keys move, Space or Enter ticks, typing jumps to a label, Escape closes.

**children** `ReactElement\<unknown, string | JSXElementConstructor\<any\>\>` *required*

The trigger element, e.g. a `TableToolbarAction`. It must forward its ref and spread props.

**onValueChange** `(value: V[]) =\> void` *required*

Called with the new ticked values each time an option is ticked or unticked.

**options** `readonly FilterMenuOption\<V\>[]` *required*

The choices, in display order.

**value** `readonly V[]` *required*

The ticked values.

**contentProps** `Omit\<DropdownMenuContentProps, "children"\>` (default: \{ align: "start" })

Props for the menu content, such as `align` or `aria-label`.

## Exported types

Also exported from `@fanvue/ui`: `FilterMenuOption`, `FilterMenuProps`.

***

**Setup:** [Installation](https://api.fanvue.com/docs/ui/installation.md) · [Theming](https://api.fanvue.com/docs/ui/theming.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.