robertlib

Select

Forms

About

An accessible native dropdown field with a label, description, validation error, required mark and optional prefix/suffix adornments or grouped options.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Select to your project and fits it to your theme.

Code

How Select is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Select from "@/components/ui/select";

export default function SelectErrorDemo() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-6 bg-background p-6 text-foreground">
      <Select
        label="Plan"
        error="Please choose a plan to continue."
        hasEmpty
        options={[
          { label: "Starter", value: "starter" },
          { label: "Pro", value: "pro" },
          { label: "Enterprise", value: "enterprise" },
        ]}
        required
      />
    </div>
  );
}

More by robertlib

View all
  • Timeline

    Timeline

    8
  • Spinner

    Spinner

    3
  • Collapsible Content

    Collapsible Content

    1
  • Chip

    Chip

    1
  • Switch

    Switch

    1
  • Progress Indicator

    Progress Indicator

    1
  • Avatar

    Avatar

  • Form Description

    Form Description

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • SignInPage

    SignInPage

    668
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K