Skip to main content

Select
component

A dropdown component with support for grouped options and disabled states. You can view the Storybook for more interactive examples.

Was this section helpful?

Select

import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@shopify/shop-minis-react'

export default function MyComponent() {
return (
<Select defaultValue="option-1">
<SelectTrigger>
<SelectValue placeholder="Select an option" />
</SelectTrigger>
<SelectContent>
<SelectItem value="option-1">Option 1</SelectItem>
<SelectItem value="option-2">Option 2</SelectItem>
<SelectItem value="option-3">Option 3</SelectItem>
</SelectContent>
</Select>
)
}

Preview

Select configurations and grouping options

Basic dropdown with options

Dropdown with grouped options

A disabled select dropdown

Was this section helpful?

Default select

import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@shopify/shop-minis-react'

export default function MyComponent() {
return (
<Select defaultValue="option-1">
<SelectTrigger>
<SelectValue placeholder="Select an option" />
</SelectTrigger>
<SelectContent>
<SelectItem value="option-1">Option 1</SelectItem>
<SelectItem value="option-2">Option 2</SelectItem>
<SelectItem value="option-3">Option 3</SelectItem>
</SelectContent>
</Select>
)
}