# @styled-system/should-forward-prop

> Utility for filtering Styled System props with Emotion's shouldForwardProp option

Latest version **5.1.5** (published 2020-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @styled-system/should-forward-prop
pnpm add @styled-system/should-forward-prop
yarn add @styled-system/should-forward-prop
bun add @styled-system/should-forward-prop
```

## Health

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

Positive: has types package; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.5 |
| Published | 2020-02-17 |
| First published | 2019-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/styled-system__should-forward-prop) |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brent Jackson |
| Maintainers | jxnblk |

## Links

- npm: https://www.npmjs.com/package/@styled-system/should-forward-prop
- npm.io page: https://npm.io/package/@styled-system/should-forward-prop

## Dependencies (3)

- [styled-system](https://npm.io/package/styled-system.md) ^5.1.5
- [@emotion/memoize](https://npm.io/package/@emotion/memoize.md) ^0.7.1
- [@emotion/is-prop-valid](https://npm.io/package/@emotion/is-prop-valid.md) ^0.8.1

## Recent versions

- 5.1.5 (latest) — 2020-02-17
- 5.0.0-12 (next) — 2019-06-02
- 5.1.4 — 2019-12-02
- 5.1.2 — 2019-09-11
- 5.1.1 — 2019-08-22
- 5.1.0 — 2019-08-12
- 5.0.23 — 2019-08-12
- 5.0.21 — 2019-08-08
- 5.0.20 — 2019-08-07
- 5.0.18 — 2019-07-31
- 5.0.16 — 2019-07-22
- 5.0.15 — 2019-07-15
- 5.0.14 — 2019-07-15
- 5.0.12 — 2019-06-25
- 5.0.10 — 2019-06-19
- … 10 more at https://npm.io/package/@styled-system/should-forward-prop/versions

## README

# @styled-system/should-forward-prop

Utility for filtering Styled System props with Emotion's shouldForwardProp option

```sh
npm i @styled-system/should-forward-prop
```

```js
import styled from '@emotion/styled'
import {
  space,
  color,
  typography
} from 'styled-system'
import shouldForwardProp from '@styled-system/should-forward-prop'

const Box = styled('div', { shouldForwardProp })(
  space,
  color,
  typography
)
```

## Custom Props

To exclude other custom props not included in Styled System, use the `createShouldForwardProp` utility.

```js
import styled from '@emotion/styled'
import { space, color } from 'styled-system'
import { createShouldForwardProp, props } from '@styled-system/should-forward-prop'

const shouldForwardProp = createShouldForwardProp([
  ...props,
  'd',
  'x'
])

const Box = styled('div', {
  shouldForwardProp
})(props => ({
  display: props.d,
  fontWeight: props.x ? 'bold' : null,
}),
  space,
  color
)
```

MIT License

---
_Source: https://npm.io/package/@styled-system/should-forward-prop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
