# Spacer

Flexible space between flex children



<ComponentPreview base="ink" name="spacer-demo" />

Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @termcn/spacer
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Copy and paste the following code into your project.
      </Step>

      <ComponentSource base="ink" name="spacer" title="components/ui/spacer.tsx" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

Usage [#usage]

```tsx
import { Spacer } from "@/components/ui/spacer";
```

```tsx
<Box flexDirection="row">
  <Text>Left</Text>
  <Spacer />
  <Text>Right</Text>
</Box>
```

API Reference [#api-reference]

Spacer [#spacer]

| Prop        | Type                         | Default        |
| ----------- | ---------------------------- | -------------- |
| `size`      | `number`                     | -              |
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` |
