ui/select.tsx

prisma-editor · src/components/ui/select.tsx · typescript · MIT
ui

Reusable select dropdown component built with Radix UI primitives and Tailwind CSS.

// Source: https://github.com/mohammed-bahumaish/prisma-editor | License: MIT | Copyright 2025 Mohammed Bahumaish
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown } from "lucide-react";

import { cn } from "~/components/ui/lib/cn";

const Select = SelectPrimitive.Root;

const SelectGroup = SelectPrimitive.Group;

const SelectValue = SelectPrimitive.Value;

const SelectTrigger = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.Trigger>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
  <SelectPrimitive.Trigger
    ref={ref}
    className={cn(
      "flex h-10 w-full it

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key