Spacer

Empty space, greedy by default.

import { Row, Spacer } from '@textui/core';

<Row>
  <text content="left" />
  <Spacer />
  <text content="right" />
</Row>

Props

| Prop | Type | Default | | | — | — | — | — | | size | number | | |

Plus everything on BoxProps.

The component and the <spacer> primitive differ in one way: this one is greedy without being told, so <Spacer /> takes the leftover room where <spacer /> needs flex={1}. size fixes it at a number of cells instead.

They are two different things whose names differ only in case. That is worth knowing when reading a graph, where { component: 'Spacer' } and { component: 'spacer' } are not the same node.

See also


Back to top

MIT licensed. Pre-1.0 - the surface is still moving.