# Notification settings

> Horizontal field rows each toggled with a switch.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/card-11).

- Page, with a live preview: https://shadcn.exchange/r/flx/card-11
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/card-11-light-10bc4bfc586b962b.png
- Registry item: https://ui.flexnative.com/r/card-11.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/card-11.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`, `switch`, `field`

## Files

### `registry/patterns/card/card-11.tsx`

```tsx
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
import {
  Field,
  FieldContent,
  FieldDescription,
  FieldGroup,
  FieldLabel,
} from '@/components/ui/field'
import { Switch } from '@/components/ui/switch'

const settings = [
  {
    id: 'card-11-product',
    label: 'Product updates',
    description: 'News about features and improvements.',
    defaultChecked: true,
  },
  {
    id: 'card-11-security',
    label: 'Security alerts',
    description: 'Get notified about suspicious activity.',
    defaultChecked: true,
  },
  {
    id: 'card-11-marketing',
    label: 'Marketing emails',
    description: 'Tips, offers, and occasional surveys.',
    defaultChecked: false,
  },
]

export function Card11() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Notifications</CardTitle>
        <CardDescription>Choose what you want to hear about.</CardDescription>
      </CardHeader>
      <CardContent>
        <FieldGroup>
          {settings.map((setting) => (
            <Field key={setting.id} orientation="horizontal">
              <FieldContent>
                <FieldLabel htmlFor={setting.id}>{setting.label}</FieldLabel>
                <FieldDescription>{setting.description}</FieldDescription>
              </FieldContent>
              <Switch id={setting.id} defaultChecked={setting.defaultChecked} />
            </Field>
          ))}
        </FieldGroup>
      </CardContent>
    </Card>
  )
}
```
