Select

Custom dropdown with label, hint, error, and six leading-element types — maps 1:1 to Figma Select variants.

import{ Select } from "@pepulux/ui"

Default — Type: Default

Plain select with label, required mark, help icon, and hint text.

*

This is a hint text to help user.

Icon leading — Type: Icon leading

Pass leadingIcon to show any icon before the placeholder/value.

*

This is a hint text to help user.

Avatar leading — Type: Avatar leading

Pass leadingAvatar to show a user avatar before the placeholder.

*

This is a hint text to help user.

Dot leading — Type: Dot leading

Pass leadingDot with a CSS color string. Options can also carry dot colors.

*

This is a hint text to help user.

Search — Type: Search

Search icon leading + optional keyboard shortcut badge on the right.

*

This is a hint text to help user.

Sizes

sm (36px) · md (40px, default) · lg (44px)

States

Placeholder → Filled → Error → Disabled

Please select a department.

Disabled options

Set disabled on individual options to prevent selection.

Props

PropTypeDefaultDescription
options*SelectOption[]{ value, label, icon?, dot?, disabled? }
valuestringControlled selected value.
defaultValuestringUncontrolled initial value.
onChange(value: string) => voidCalled when selection changes.
placeholderstring"Select option"Placeholder text when nothing is selected.
size"sm" | "md" | "lg""md"Trigger height.
labelstringLabel above the select.
requiredbooleanfalseShows purple asterisk after label.
helpTextstringTooltip text on the help-circle icon.
hintstringHint text below the select.
errorbooleanfalseSets error border + ring.
errorTextstringError message replaces hint.
disabledbooleanfalseDisables all interaction.
leadingIconReactNodeIcon on the left of the trigger (Figma: Icon leading).
leadingAvatarReactNodeAvatar element on the left (Figma: Avatar leading).
leadingDotstringCSS color for a dot indicator on the left (Figma: Dot leading).
shortcutstringKeyboard shortcut badge on the right e.g. "⌘K" (Figma: Search type).