# Select
A versatile Select component for choosing from a list of options.
```jsx featured
Fruit
Apple
Banana
Mango
```
```css preview
.select-root[data-variant] {
flex: 1;
display: flex;
flex-wrap: wrap;
gap: calc(8px * var(--lcs-spacing, 1));
width: 100%;
outline: none;
&[data-variant="outlined"] {
&:not(:has(.select-label[data-position="inside"])) {
.select-trigger {
border: 1px solid rgb(var(--border-color));
}
}
}
&[data-variant="solid"] {
.select-trigger {
background-color: rgba(var(--background-color-2), 0.95);
}
}
}
.select-trigger[data-variant] {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: var(--lcs-radius);
background: transparent;
border: none;
cursor: pointer;
min-height: 32px;
padding: calc(4px * var(--lcs-spacing)) calc(8px * var(--lcs-spacing));
outline: none;
}
.select-content {
background-color: rgba(var(--background-color-1), 0.9);
border-radius: min(var(--lcs-radius), 24px);
box-shadow: var(--shadow-md);
backdrop-filter: blur(var(--lcs-backdrop-blur, 2px));
overflow: hidden;
}
```
[View Source](https://github.com/LocusInc/locus-ui/tree/main/packages/locus-ui/src/components/select)
## Anatomy
```jsx code no-header
```
## Examples
### Label Positions
The label can be positioned with the `position` prop: `top`, `left`, or `inside`.
```jsx
{["top", "left", "inside"].map((position) => (
{position.charAt(0).toUpperCase() + position.slice(1)}
Option 1
Option 2
Option 3
))}
```
### Variants
Select components come with three built in variants, `outlined`, `solid`, and `clear`, each shown across all label positions.
```jsx
{["outlined", "solid", "clear"].map((variant) => (
{variant.charAt(0).toUpperCase() + variant.slice(1)}
Option 1
Option 2
Option 3
))}
```
### Groups
Items can be organized into groups using `Select.Group` with a `title`, separated by `Select.Separator`.
```jsx
Option 1
Option 2
Option 3
Option 4
```