# Layout

## Examples


### Basic

```typescript
import React from 'react';

import Button from '@splunk/react-ui/Button';
import Layout from '@splunk/react-ui/Layout';
import Search from '@splunk/react-ui/Search';
import Switch from '@splunk/react-ui/Switch';


function Basic() {
    return (
        <Layout>
            <Button label="Button" />
            <Search inline />
            <Switch />
        </Layout>
    );
}

export default Basic;
```




## API


### Layout API

Renders a container to layout children using standard spacing values.

#### Props

| Name | Type | Required | Default | Description |
|------|------|------|------|------|
| children | React.ReactNode | no |  |  |
| elementRef | React.Ref<HTMLDivElement> | no |  | A React ref which is set to the DOM element when the component mounts, and null when it unmounts. |





