### Examples
**More examples** are available on NorthStar Storybook.
```jsx
import Select from 'aws-northstar/components/Select';
import Container from 'aws-northstar/layouts/Container';
const options = [
{ label: 'Option 1', value: '1' },
{ label: 'Option 2', value: '2' },
{ label: 'Option 3', value: '3' }
];
const [selectedOption, setSeletedOption] = React.useState();
const onChange = (event) => {
setSeletedOption(options.find(o => o.value === event.target.value));
};
```
```jsx
import Select from 'aws-northstar/components/Select';
import Container from 'aws-northstar/layouts/Container';
const options = [
{label: 'Group one', options: [ { label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' } ]},
{label: 'Group two', options: [ { label: 'Option 3', value: '3' } ]}
];
const [selectedOption, setSeletedOption] = React.useState();
const onChange = (event) => {
setSeletedOption({ value: event.target.value });
};
```
```jsx
import Select from 'aws-northstar/components/Select';
import Container from 'aws-northstar/layouts/Container';
import Stack from 'aws-northstar/layouts/Stack';
const options = [
{ label: 'Option 1', value: '1' },
{ label: 'Option 2', value: '2' },
{ label: 'Option 3', value: '3' }
];
```
```jsx
import Select from 'aws-northstar/components/Select';
import Container from 'aws-northstar/layouts/Container';
const [options, setOptions] = React.useState([]);
const [statusType, setStatusType] = React.useState(null);
const onFocus = () => {
setStatusType('loading');
setTimeout(() => {
setStatusType('finished');
setOptions([
{ label: 'Option 1', value: '1' },
{ label: 'Option 2', value: '2' }
]);
}, 1000);
};
```