# V select 7

> Basic select

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-select-7).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-select-7
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-select-7-light-38f928c4efcf1c0d.png
- Registry item: https://ui.cnippet.dev/r/v-select-7.json
- Categories: select
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-select-7.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: `@cnippet/select`

## Files

### `registry/default/variants/v-select-7.tsx`

```tsx
"use client";

import { useState } from "react";
import { Button } from "@/registry/default/ui/button";
import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@/registry/default/ui/field";
import {
  Select,
  SelectItem,
  SelectPopup,
  SelectTrigger,
  SelectValue,
} from "@/registry/default/ui/select";

type NotificationFrequency = { label: string; value: string | null };

const frequencies: NotificationFrequency[] = [
  { label: "Select frequency", value: null },
  { label: "Real-time", value: "realtime" },
  { label: "Hourly digest", value: "hourly" },
  { label: "Daily digest", value: "daily" },
  { label: "Weekly summary", value: "weekly" },
  { label: "Never", value: "never" },
];

export default function Component() {
  const [saved, setSaved] = useState(false);

  function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
    e.preventDefault();
    setSaved(true);
    setTimeout(() => setSaved(false), 2000);
  }

  return (
    <form className="flex w-64 flex-col gap-5" onSubmit={handleSubmit}>
      <Field>
        <FieldLabel>Notification frequency</FieldLabel>
        <Select items={frequencies} name="frequency">
          <SelectTrigger>
            <SelectValue />
          </SelectTrigger>
          <SelectPopup>
            {frequencies.slice(1).map((item) => (
              <SelectItem key={item.value} value={item}>
                {item.label}
              </SelectItem>
            ))}
          </SelectPopup>
        </Select>
        <FieldDescription>
          How often you want to receive email notifications.
        </FieldDescription>
      </Field>
      <Button type="submit">{saved ? "Saved!" : "Save preferences"}</Button>
    </form>
  );
}
```
