miladjoodi

Native Select

Forms

About

A styled wrapper around the native HTML select element for choosing one option from a dropdown, with support for option groups, disabled and invalid states.

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

Code

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

Usage.tsx

import {
  NativeSelect,
  NativeSelectOptGroup,
  NativeSelectOption,
} from "@/components/ui/native-select";

export default function NativeSelectGroups() {
  return (
    <div dir="rtl">
      <NativeSelect>
        <NativeSelectOption value="">انتخاب دپارتمان</NativeSelectOption>
        <NativeSelectOptGroup label="مهندسی">
          <NativeSelectOption value="frontend">فرانت‌اند</NativeSelectOption>
          <NativeSelectOption value="backend">بک‌اند</NativeSelectOption>
          <NativeSelectOption value="devops">DevOps</NativeSelectOption>
        </NativeSelectOptGroup>
        <NativeSelectOptGroup label="فروش">
          <NativeSelectOption value="sales-rep">
            نماینده فروش
          </NativeSelectOption>
          <NativeSelectOption value="account-manager">
            مدیر حساب
          </NativeSelectOption>
          <NativeSelectOption value="sales-director">
            مدیر فروش
          </NativeSelectOption>
        </NativeSelectOptGroup>
        <NativeSelectOptGroup label="عملیات">
          <NativeSelectOption value="support">
            پشتیبانی مشتری
          </NativeSelectOption>
          <NativeSelectOption value="product-manager">
            مدیر محصول
          </NativeSelectOption>
          <NativeSelectOption value="ops-manager">
            مدیر عملیات
          </NativeSelectOption>
        </NativeSelectOptGroup>
      </NativeSelect>
    </div>
  );
}

Dependencies

More by miladjoodi

View all
  • Image Diff Slider

    Image Diff Slider

    32
  • Empty State

    Empty State

  • Signature Pad

    Signature Pad

  • Hover Card

    Hover Card

  • File Upload

    File Upload

  • Card

    Card

  • Drag Scroll

    Drag Scroll

  • Context Menu

    Context Menu

More in Forms

View all
  • Login 1

    Login 1

    64
  • Premium Auth

    Premium Auth

    571
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Book A Demo 1

    Book A Demo 1

    91
  • Authentication Card

    Authentication Card

    52
  • Card Studio

    Card Studio

    47
  • Login Card

    Login Card

    35