Rendyn

Component library

189 components

Interaction

Select

Select composes a trigger, value, content and items around a selected string value.

React Tailwind CSS

Practical React example

Choose one delivery option from a short known list.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/select.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Choose one delivery option from a short known list

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { useState } from "react";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/motion/select";

export function SelectPreview() {
  const [value, setValue] = useState("next");
  return (
    <div className="w-56">
      <Select value={value} onValueChange={setValue}>
        <SelectTrigger>
          <SelectValue placeholder="Pick a framework" />
        </SelectTrigger>
        <SelectContent>
          <SelectItem value="next">Next.js</SelectItem>
          <SelectItem value="remix">Remix</SelectItem>
          <SelectItem value="astro">Astro</SelectItem>
          <SelectItem value="vite">Vite</SelectItem>
        </SelectContent>
      </Select>
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Each item needs a stable value independent of its label. Control value and onValueChange when the choice feeds a form or another component.

Customization

SelectProps.value
Optional; string.
SelectProps.defaultValue
Optional; string.
SelectProps.onValueChange
Optional; (value: string) => void.
SelectProps.open
Optional; boolean. Controlled open state of the panel. A layout that stacks selects can hold this to keep exactly one panel open — the panel is absolutely positioned inside its field, so two open at once paint over each other's options.
SelectProps.defaultOpen
Optional; boolean. Uncontrolled initial open state. Default false.
SelectProps.onOpenChange
Optional; (open: boolean) => void. Fires whenever the panel opens or closes. The panel is absolutely positioned inside the field, so a layout that stacks selects has to know which one is open to paint it above its neighbours.
SelectProps.disabled
Optional; boolean.
SelectProps.className
Optional; string.
SelectProps.children
Required; ReactNode.
SelectTriggerProps.className
Optional; string.
SelectTriggerProps.children
Required; ReactNode.
SelectValueProps.placeholder
Optional; string.
SelectValueProps.className
Optional; string.
SelectContentProps.className
Optional; string.

Integration notes

  • The panel is positioned inside its field; check stacking and clipping when several selects are near each other.
  • Verify that the selected value is included in the submitted form; a custom visual control is not automatically a native select.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP