--- title: Space sidebar_label: Space --- import { StoryWithControls } from '../../../src/components/StorybookWrapper'; # Space The Space component from Superset's UI library. ## Live Example ## Try It Edit the code below to experiment with the component: ```tsx live function Demo() { return ( {['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5'].map(item => (
{item}
))}
); } ``` ## Vertical Space ```tsx live function VerticalSpace() { return ( ); } ``` ## Space Sizes ```tsx live function SpaceSizes() { const items = ['Item 1', 'Item 2', 'Item 3']; const itemStyle = { padding: '8px 16px', background: '#e6f4ff', border: '1px solid #91caff', borderRadius: 4, }; return (
{['small', 'middle', 'large'].map(size => (

{size}

{items.map(item => (
{item}
))}
))}
); } ``` ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `direction` | `string` | `"horizontal"` | - | | `size` | `string` | `"small"` | - | | `wrap` | `boolean` | `false` | - | ## Import ```tsx import { Space } from '@superset/components'; ``` --- :::tip[Improve this page] This documentation is auto-generated from the component's Storybook story. Help improve it by [editing the story file](https://github.com/apache/superset/edit/master/superset-frontend/packages/superset-ui-core/src/components/Space/Space.stories.tsx). :::