Need help with tailwindcss-dir?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

RonMelkhior
148 Stars 8 Forks MIT License 20 Commits 7 Opened issues

Description

Adds direction (LTR, RTL) variants to your Tailwind project

Services available

!
?

Need anything else?

Contributors list

# 304,342
Discord
Laravel
HTML
JavaScr...
15 commits
# 286,062
JavaScr...
HTML
tailwin...
rtl
1 commit

Tailwind Direction

Total Downloads Latest Release

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.

# 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.
plugins: [
    require('tailwindcss-dir')(),
],

Finally, you can use the plugin and add it to modules you want to use it with.

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:
Hello world.

License

Tailwind Direction is licensed under the MIT license.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.