# @berlitz/spacer

> Spacer component for the Max Design System

Latest version **2.0.9** (published 2021-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @berlitz/spacer
pnpm add @berlitz/spacer
yarn add @berlitz/spacer
bun add @berlitz/spacer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.9 |
| Published | 2021-09-20 |
| First published | 2019-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | berlitz |

## Links

- npm: https://www.npmjs.com/package/@berlitz/spacer
- Homepage: https://github.com/berlitz-global/max/blob/master/components/spacer/CHANGELOG.md
- npm.io page: https://npm.io/package/@berlitz/spacer

## Dependencies (1)

- [styled-components-rtl](https://npm.io/package/styled-components-rtl.md) 5.2.0

## Recent versions

- 2.0.9 (latest) — 2021-09-20
- 2.0.10-test.25 (canary) — 2022-01-24
- 2.0.8 — 2021-08-05
- 2.0.7 — 2021-04-09
- 2.0.6 — 2021-02-12
- 2.0.1-alpha.63 — 2021-02-12
- 2.0.5 — 2021-01-29
- 2.0.4 — 2021-01-27
- 2.0.3 — 2021-01-27
- 2.0.2 — 2021-01-06
- 2.0.1 — 2021-01-05
- 2.0.0 — 2020-10-16
- 1.4.1 — 2020-01-02
- 1.4.0 — 2019-12-16
- 1.3.2 — 2019-10-24
- … 16 more at https://npm.io/package/@berlitz/spacer/versions

## README

# Spacer [![npm version](https://img.shields.io/npm/v/@berlitz/spacer.svg)](https://www.npmjs.com/package/@berlitz/spacer)

The Spacer component creates space between your other Components/Elements. Use the size Prop to specify the size of the space, based on the theme size variables. This comes with responsive breakpoints. This can be used as a wrapper which will act as padding around the wrapped children. 

## Installation

```shell
yarn add @berlitz/spacer
```

## Props

| Argument    | Type   | Required | Default | Example                                            |
| ----------- | ------ | -------- | ------- | -------------------------------------------------- |
| top         | bool   |          | false   |                                                    |
| bottom      | bool   |          | false   |                                                    |
| left        | bool   |          | false   |                                                    |
| right       | bool   |          | false   |                                                    |
| noTop       | bool   |          | false   |                                                    |
| noBottom    | bool   |          | false   |                                                    |
| noLeft      | bool   |          | false   |                                                    |
| noRight     | bool   |          | false   |                                                    |
| size        | string |          | "md"    | "xs"  (refer to theme variables theme.space[size]) |
| breakpoints | object |          | {}      | breakpoints={{md: 'lg', lg: 'xxl',}}               |

## Usage

```jsx
import React from 'react'
import Spacer from '@berlitz/spacer'

const MyApp = () => 
<App>
    <Hero>
    <Section>
        <H1>Boo!</H1>
        <LeadText> Hello Friend 👻</LeadText>
        <Spacer size="xl"/>
        <Content>Some Paragraph</Content>
        <Spacer
            noBottom
            size="xl"
            breakpoints={{
                lg: 'md',
                xl: 'xxl',
            }}
        >
            <Image/>
        </Spacer>
        <ThreeCatPillars/>
    </Section>
    <Footer/>
</App>
```

### When to use this component

- Rather than extending components just for space, this component comes very handy.
- Quickly Add space anywhere necessary

---
_Source: https://npm.io/package/@berlitz/spacer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
