Select

Displays a list of options for the user to pick from—triggered by a button.

Select.Root

size

123

Select.Trigger

color

rubygraygoldbronzebrownyellowamberorangetomatoredcrimsonpinkplumpurplevioletirisindigobluecyantealjadegreengrasslimemintsky

ghost

boolean

highContrast

boolean

placeholder

string

Also supports MarginProps: `m`, `mb`, `ml`, `mr`, `mt`, `mx`, `my`

Select.Content

container

Element | DocumentFragment | null

Use the size prop to control the size.

Ghost

Use the ghost trigger variant to render the trigger without a visually containing element. Ghost triggers behave differently in layout as they use a negative margin to optically align themselves against their siblings while maintaining their padded active and hover states.

Use the placeholder prop to create a Trigger that doesn’t need an initial value.

Use the disabled prop to disable the select.

Set position="popper" prop to position the select menu below the trigger.

When using server-side rendering, you might notice a layout shift after hydration. This is because Trigger executes client-side code to display the selected item’s text. To avoid that layout shift, you can render it manually by mapping values.

You can customise how Trigger renders the value by controlling its children manually. For example, you can render an icon next to the selected item’s text.

Dashboard

8 variants found

Select in Edit Brandingdashboard

/branding/edit

Select in Edit Brandingdashboard

/branding/edit

ghost select in Directory Role Mapping Dialogdashboard
ghost=true
size 2 select in Notification Filterdashboard

/:environmentId/notifications

size=2
size 1 select in Role Selectordashboard
size=1
size 1 select in Environment Info Textdashboard
size=1
ghost select in Role Selectordashboard
ghost=truecolor=gray
ghost select in Environment Info Textdashboard
ghost=truecolor=gray

Admin Portal

2 variants found

ghost select in Role Selectadmin-portal

/p/:portalSessionId/directory-sync/role-assignment

ghost=true
size 2 select in Connection Sessions Table Headeradmin-portalstatic

/p/:portalSessionId/sso/:connectionId/completed/connection-sessions-table

<Flex align="center" justify="between"> <Heading as="h3" size="3"> Sessions </Heading> <Select.Root size="2" value={defaultStatus || 'all'} onValueChange={(value) => { navigateWithSearchQuery( 'status', value === 'all' ? undefined : value, ); }} > <Select.Trigger ghost /> <Select.Content> <Select.Group> <Select.Item key="status-all" value="all"> All </Select.Item> {availableFilters.map((filter) => ( <Select.Item key={`status-${filter.value}`} value={filter.value}> {filter.label} </Select.Item> ))} </Select.Group> </Select.Content> </Select.Root> </Flex>
size=2

Context

Select.Root
PropTypeDefaultRequired
size
Responsive<"1" | "2" | "3">no
Select.Trigger
PropTypeDefaultRequired
color
"ruby" | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | ... 8 more ...no
ghost
booleanno
highContrast
booleanno
placeholder
stringno

Also supports MarginProps: m, mb, ml, mr, mt, mx, my

Select.Content
PropTypeDefaultRequired
container
Element | DocumentFragment | nullno

Usage

Used 261 times across 2 packages

Dashboard
196
Admin Portal
65

Variant Distribution

ghost

true
100%

position

popper
100%

size

1
60%
2
40%

side

bottom
50%
top
50%

color

gray
100%

align

end
100%

Where it's used

39 files

/branding/edit

packages/dashboard/src/app/(private)/(chromeless)/branding/edit/edit-branding.tsx40
packages/dashboard/src/components/authentication/configure-session/configure-sessions-dialog.tsx18
packages/dashboard/src/components/log-streams/log-stream-destination-datadog.tsx9
packages/dashboard/src/components/api-keys/create-api-key-modal.tsx6
packages/dashboard/src/components/api-keys/expire-api-key-modal.tsx6
packages/dashboard/src/components/audit-logs/audit-logs-export-csv-modal/date-range-picker.tsx6
packages/dashboard/src/components/connections/connection-group-role-assignment/create-connection-group-dialog.tsx6
packages/dashboard/src/components/connections/connection-group-role-assignment/edit-connection-group-dialog.tsx6

/p/:portalSessionId/sso/:connectionId/completed/components/connection-attribute-mapping

packages/admin-portal/src/app/p/[portalSessionId]/sso/[connectionId]/completed/components/connection-attribute-mapping/edit-attribute-mappings-dialog.tsx8

/:environmentId/notifications

packages/dashboard/src/app/(private)/(sidebar)/[environmentId]/notifications/notification-filter.tsx6

Show 29 more files