---
title: "Spacing — React"
canonical: https://sky-ui.cf.sky.com/foundations/spacing/react
apiPackages: [{"name":"@sky-uk/ui-core","representedVersion":"13.2.0"}]
---

# Spacing — React

```js
import { spacing } from '@sky-uk/ui-core';

spacing(1);

// returns
4px
```

---

You can return the spacing without a `px` suffix by passing `false` as a second argument. This is useful if you need to use the raw number for calculations.

```js
spacing(1, false);

// returns
4;
```

---

## Available Spacing Units

| Key | Value |
| --- | --- |
| 0 | 0 |
| 1 | 4px |
| 2 | 8px |
| 3 | 12px |
| 4 | 16px |
| 5 | 24px |
| 6 | 32px |
| 7 | 48px |
| 8 | 72px |
