### Examples
**More examples** are available on NorthStar Storybook.
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest'
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField'
import { awsServices } from './data/data';
```
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest'
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField'
import { groupedAwsServices } from './data/data';
```
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest';
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField';
import { awsServices } from './data/data';
const [shouldLoad, setLoadingStatus] = React.useState(false);
const [status, setStatus] = React.useState('finished');
const [options, setOptions] = React.useState([]);
const loading = shouldLoad && options.length === 0;
function sleep(delay = 0) {
return new Promise(resolve => {
setTimeout(resolve, delay);
});
}
React.useEffect(() => {
if (!loading) {
return undefined;
}
(async () => {
setStatus('loading');
await sleep(1e3); // For demo purposes.
setStatus('finished');
setOptions(awsServices);
setLoadingStatus(false);
})();
}, [loading]);
{
setOptions([]);
setLoadingStatus(true);
}}
statusType={status}
options={options}
empty="No matching service found"
/>
```
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest';
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField';
import { awsServices } from './data/data';
const [shouldLoad, setLoadingStatus] = React.useState(false);
const [status, setStatus] = React.useState('finished');
function sleep(delay = 0) {
return new Promise(resolve => {
setTimeout(resolve, delay);
});
}
React.useEffect(() => {
if (!shouldLoad) {
return undefined;
}
(async () => {
setStatus('loading');
await sleep(1e3); // For demo purposes.
setStatus('error');
setLoadingStatus(false);
})();
}, [shouldLoad]);
{
setLoadingStatus(true);
}}
onRecoveryClick={e => {
setLoadingStatus(true);
}}
statusType={status}
recoveryText="Retry"
empty="No matching service found"
/>
```
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest'
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField'
import { awsServices } from './data/data';
```
```jsx
import Autosuggest from 'aws-northstar/components/Autosuggest'
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField';
import DnsOutlined from '@material-ui/icons/DnsOutlined';
import { awsServices } from './data/data';
```
```jsx
import Computer from "@material-ui/icons/Computer";
import Autosuggest from 'aws-northstar/components/Autosuggest'
import Container from 'aws-northstar/layouts/Container';
import FormField from 'aws-northstar/components/FormField';
import { awsServices } from './data/data';
```