# style-builder

> JavaScript Utility to convert shorthand CSS properties into subcomponents

Latest version **1.0.13** (published 2016-03-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install style-builder
pnpm add style-builder
yarn add style-builder
bun add style-builder
```

## 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 | 1.0.13 |
| Published | 2016-03-07 |
| First published | 2015-10-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | actioniq |
| Maintainers | actioniq |
| Keywords | react, javascript, css, inline-styles |

## Links

- npm: https://www.npmjs.com/package/style-builder
- Repository: https://github.com/ActionIQ/style-builder
- Homepage: https://github.com/ActionIQ/style-builder#readme
- Issues: https://github.com/ActionIQ/style-builder/issues
- npm.io page: https://npm.io/package/style-builder

## Dependencies (1)

- [object-assign](https://npm.io/package/object-assign.md) ^4.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.13 (latest) — 2016-03-07
- 1.0.12 — 2016-03-05
- 1.0.11 — 2016-03-04
- 1.0.10 — 2015-12-15
- 1.0.9 — 2015-11-23
- 1.0.8 — 2015-11-23
- 1.0.7 — 2015-11-23
- 1.0.6 — 2015-11-19
- 1.0.5 — 2015-11-05
- 1.0.2 — 2015-10-09
- 1.0.1 — 2015-10-09

## README

# Style Builder

A JavaScript utility to break apart shorthand CSS components in objects.

When using inline styles with React components, it can be dangerous to use shorthand CSS properties. As a work around, use StyleBuilder to break apart any shorthand properties that exist in your style objects.

Read our blog post [here](http://www.actioniq.co/blog/reactjs-cramping-my-style/)

## Example

```
const StyleBuilder = require("style-builder");

const _styles = StyleBuilder.build({
  margin: "5px 10px"
});

console.log(_styles);
{
  marginTop: "5px",
  marginRight: "10px",
  marginBottom: "5px",
  marginLeft: "10px"
}
```
## Build
```
npm run-script build
```

## Test
```
npm test
```

## TODO
* background
* font
* transition
* transform
* list-style

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