# styled-tailwind

> Use tailwind classes in styled-components for quick protoyping of consistent designs without the need for tools like pureCss to remove unused css classes.

Latest version **1.0.0** (published 2019-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install styled-tailwind
pnpm add styled-tailwind
yarn add styled-tailwind
bun add styled-tailwind
```

## 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.0 |
| Published | 2019-07-16 |
| First published | 2019-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 71.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kavaro |
| Maintainers | kavaro |

## Links

- npm: https://www.npmjs.com/package/styled-tailwind
- Repository: https://github.com/kavaro/styled-tailwind
- npm.io page: https://npm.io/package/styled-tailwind

## Dependencies (1)

- [is-string](https://npm.io/package/is-string.md) ^1.0.4

## Recent versions

- 1.0.0 (latest) — 2019-07-16
- 0.1.0 — 2019-04-12

## README

# styled-tailwind

Use tailwind classes in styled-components for quick protoyping of consistent designs
without the need for tools like pureCss to remove unused css classes.

## Install

```bash
npm install --save styled-tailwind
```

## Usage 1: default tailwind configuration

```jsx
import React, { Component } from 'react'
import tw from 'styled-tailwind'

const H1 = styled.h1`
  ${tw('bg-red text-white p-5 m-5')}
`

class Example extends Component {
  render () {
    return (
      <H1>Hello world</H1>
    )
  }
}
```

## Usage 2: custom tailwind configuration

```jsx
import React, { Component } from 'react'
import {styledTailwind, defaultTailwindConfig, defaultTailwindColors} from 'styled-tailwind'

const tw = styledTailwind(defaultTailwindConfig({...defaultTailwindColors, primary: '#3490dc', secondary: '#f6993f'}))

const H1 = styled.h1`
  ${tw('bg-secondary text-primary p-5 m-5')}
`

class Example extends Component {
  render () {
    return (
      <H1>Hello world</H1>
    )
  }
}
```

## License

MIT © [kavaro](https://github.com/kavaro)

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