# Option sets

> Tenant-editable items for a field such as priority or severity: ordered items with a label, color, icon and a level the record keeps in its own column, replacement when an item is removed, and starter items per brand.

- Category: Work management
- Module: `option-sets`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/option-sets
- Page: https://bettersupabase.com/blocks/option-sets

## Install

```bash
npx better-supabase add option-sets
```

The command also installs `updated-at`, `memberships`, `permissions`, `subjects`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by option-sets; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    subjects: {},
    // Modes: "managed", "custom". The default is "managed".
    "option-sets": { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/option-sets`.

## Events

- `option_set.created`
- `option_set.updated`
- `option_set_item.archived`
- `option_set_item.created`
- `option_set_item.updated`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [subjects](https://bettersupabase.com/blocks/subjects.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md)
