felipemenezes098

Flexnative Select

Forms 2

About

A Select dropdown from the Flexnative UI registry with 10 variants: basic, grouped options, disabled, leading icons, object values, description items, disabled items, avatar user-picker, labelled field, and an icon-in-trigger. Built on Radix Select.

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

Code

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

Usage.tsx

'use client'

import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from '@/components/ui/flexnative-select'
import { useState } from 'react'

const users = [
  {
    value: 'sarah',
    name: 'Sarah Chen',
    email: 'sarah@example.com',
    avatar:
      'https://cdn.21st.dev/assets/mirror/03/039131cd23196f79dda2cce8c0ed9e6a49832a0d73e33bbcae952cd528fe6b0f.jpg',
    initials: 'SC',
  },
  {
    value: 'marcus',
    name: 'Marcus Lee',
    email: 'marcus@example.com',
    avatar:
      'https://cdn.21st.dev/assets/mirror/9f/9f697a8fcb60a85ac182a832a9dcc35bd8700da190fb8e393cb7129856a4ee5e.jpg',
    initials: 'ML',
  },
  {
    value: 'priya',
    name: 'Priya Patel',
    email: 'priya@example.com',
    avatar:
      'https://cdn.21st.dev/assets/mirror/32/32ca3771d3e6dc40c332111e84c7480e9f1d28ba7a1b47aa8e35657c8e9f5588.jpg',
    initials: 'PP',
  },
]

export function Select08() {
  const [value, setValue] = useState(users[0].value)
  const selected = users.find((user) => user.value === value)

  return (
    <Select value={value} onValueChange={setValue}>
      <SelectTrigger className="w-full max-w-64">
        <SelectValue placeholder="Select a user">
          {selected && (
            <span className="flex items-center gap-2">
              <Avatar size="sm">
                <AvatarImage src={selected.avatar} alt="" />
                <AvatarFallback>{selected.initials}</AvatarFallback>
              </Avatar>
              <span>{selected.name}</span>
            </span>
          )}
        </SelectValue>
      </SelectTrigger>
      <SelectContent>
        <SelectGroup>
          {users.map((user) => (
            <SelectItem key={user.value} value={user.value}>
              <Avatar size="sm">
                <AvatarImage src={user.avatar} alt="" />
                <AvatarFallback>{user.initials}</AvatarFallback>
              </Avatar>
              <span className="flex flex-col gap-0.5">
                <span className="text-sm font-medium">{user.name}</span>
                <span className="text-muted-foreground text-xs font-normal">
                  {user.email}
                </span>
              </span>
            </SelectItem>
          ))}
        </SelectGroup>
      </SelectContent>
    </Select>
  )
}

export default function Default() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-background p-10">
      <Select08 />
    </div>
  )
}

Dependencies

More by felipemenezes098

View all
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    924
  • Editorial Collage Hero

    Editorial Collage Hero

    427
  • Split Hero With Image Cards

    Split Hero With Image Cards

    401
  • Editorial Image Hero

    Editorial Image Hero

    387
  • Scroll 01

    Scroll 01

    339
  • Real Estate Search Hero

    Real Estate Search Hero

    190
  • Editorial Hero

    Editorial Hero

    172
  • Hero with Dashboard Mockup

    Hero with Dashboard Mockup

    123

More in Forms

View all
  • Premium Auth

    Premium Auth

    496
  • Login 2

    Login 2

    7
  • Authentication Card

    Authentication Card

    45
  • Login 1

    Login 1

    52
  • Form

    Form

    16
  • Contact Card

    Contact Card

    1K
  • Card Studio

    Card Studio

    41
  • Form

    Form

    136