# tailwindcss-dir

> Adds direction variants to your Tailwind project

Latest version **4.0.0** (published 2019-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install tailwindcss-dir
pnpm add tailwindcss-dir
yarn add tailwindcss-dir
bun add tailwindcss-dir
```

## 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 | 4.0.0 |
| Published | 2019-09-08 |
| First published | 2018-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 120.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 231 |
| Author | Ron Melkhior |
| Maintainers | melkhior |

## Links

- npm: https://www.npmjs.com/package/tailwindcss-dir
- Repository: https://github.com/RonMelkhior/tailwindcss-dir
- Homepage: https://github.com/RonMelkhior/tailwindcss-dir#readme
- Issues: https://github.com/RonMelkhior/tailwindcss-dir/issues
- npm.io page: https://npm.io/package/tailwindcss-dir

## Dependencies (1)

- [tailwindcss](https://npm.io/package/tailwindcss.md) ^1.0.1

## Recent versions

- 4.0.0 (latest) — 2019-09-08
- 3.0.0 (next) — 2019-04-04
- 3.0.2 — 2019-05-25
- 3.0.1 — 2019-05-18
- 2.0.0 — 2018-11-01
- 1.0.1 — 2018-10-07
- 1.0.0 — 2018-10-07

## README

# Tailwind Direction

<a href="https://www.npmjs.com/package/tailwindcss-dir"><img src="https://img.shields.io/npm/dt/tailwindcss-dir.svg" alt="Total Downloads"></a>
<a href="https://github.com/RonMelkhior/tailwindcss-dir/releases"><img src="https://img.shields.io/npm/v/tailwindcss-dir.svg" alt="Latest Release"></a>

Tailwind Direction adds a custom `direction` variant to your tailwind project,
letting you have custom CSS rules for LTR and RTL layouts.

**Note: This package requires Tailwind >= v1.0.1.**

# Getting started

Install the package via NPM/Yarn.

```bash
# Yarn
yarn add tailwindcss-dir --dev

# NPM
npm install tailwindcss-dir --save-dev
```

Now, setup the plugin in your Tailwind config's `plugins` section.
Currently the plugin doesn't offer any configuration.

```js
plugins: [
	require('tailwindcss-dir')(),
],
```

Finally, you can use the plugin and add it to modules you want to use it with.

```js
variants: {
	float: ['responsive', 'direction'],
	margin: ['responsive', 'direction'],
	padding: ['responsive', 'direction'],
},
```

# Usage

The plugin adds `ltr` and `rtl` variants to your modules. With the default Tailwind configuration, you can use them like so:

```html
<div class="text-green text-2xl ltr:pl-4 rtl:pr-4">
	Hello world.
</div>
```

# License

Tailwind Direction is licensed under the MIT license.

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