Selector

A searchable selector for models, people, workspaces and visual resources. Single or multiple selection, grouped lists or thumbnail grids, optional details, removable chips and keyboard navigation share one morphing surface.

Models · Single select

selector.tsx

Use options with id and name; group, description, metadata, keywords, icon and details are optional. Control a single ID with value/onValueChange or initialize it with defaultValue. Search names, descriptions, groups, metadata and keywords; use arrow keys or Page Up/Down and Enter to choose, Escape to close. Hover or focus a row for its optional details. No size presets: className styles the outer wrapper; classNames provides trigger, content, list, option, icon, search and details overrides, merged after defaults. For example, classNames={{ content: 'w-[28rem]', trigger: 'min-h-9 px-2 text-xs', list: 'max-h-80' }} independently adjusts panel width, trigger density and list height. Viewport bounds remain in place. The existing @beui/model-selector install address remains available; the exported component is now Selector.

Choose your model

Using Claude Sonnet.

Search by model, provider, or capability. Hover or focus Claude Sonnet for details. Customize the trigger and panel with classNames.

Install

$ bunx --bun shadcn@latest add @beui/model-selector

People · Single select

selector.tsx

Choose one assignee with a string value and onValueChange. Start with value="" or defaultValue="" to show a placeholder before selection. Search names and email descriptions; selecting a person closes the panel and restores focus to the trigger. Omit multiple for single selection; the multiple example below uses the same options with an array of IDs.

Choose an assignee

Search by name or email and choose one person responsible for the task.

No assignee yet.

People · Multiple select

selector.tsx

Set multiple and triggerVariant="field" for an array of selected IDs. Choices stay open while you toggle them; remove individual chips from the field and press Done to close. Supply avatars through icon and emails through description. Disabled options cannot be selected.

Share with your team

Search names or emails, then select everyone who needs access.

Ava ThompsonMia Chen

Shared with 2 people.

Remove a chip to revoke access, or choose Done when finished.

Install

$ bunx --bun shadcn@latest add @beui/selector

Workspace · Switcher

selector.tsx

Use triggerVariant="workspace" to show the selected workspace and its description together. Groups separate team and personal spaces. An optional action with label/onSelect renders a separate footer action; the example creates and selects a new workspace.

Your work, in one place

Switch between team and personal workspaces.

Current workspace: Studio.

Create workspace adds a new workspace and switches to it immediately. New workspaces live in this demo until the page is refreshed.

Resources · Grid

selector.tsx

Set layout="grid" and provide preview content to choose templates, media or other visual resources. Search and selection work as in the list; keyboard arrows move through the displayed options. The preview uses lightweight layout thumbnails rather than image dependencies.

Start with a template

Browse the previews or search for a layout that fits your next project.

Selected template: Dashboard.

API Reference

options
SelectorOption[]
—
defaultOpen?
boolean
—
placeholder?
string
—
searchPlaceholder?
string
—
label?
string
—
triggerVariant?
"pill" | "field" | "workspace"
—
layout?
"grid" | "list"
—
action?
{ label: string; onSelect: () => void; }
—
className?
string
—
classNames?
SelectorClassNames

Style individual parts independently; className styles the outer wrapper.

—
multiple?
boolean
—
value?
string | string[]
—
defaultValue?
string | string[]
—
onValueChange?
((value: string) => void) | ((value: string[]) => void)
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated