# @ganmahmud/tailwindcss-language-variant

> Tailwind CSS plugin to generate language variant utilities.

Latest version **1.0.1** (published 2023-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ganmahmud/tailwindcss-language-variant
pnpm add @ganmahmud/tailwindcss-language-variant
yarn add @ganmahmud/tailwindcss-language-variant
bun add @ganmahmud/tailwindcss-language-variant
```

## 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.1 |
| Published | 2023-09-21 |
| First published | 2023-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | GAN MAHMUD |
| Maintainers | ganmahmud |
| Keywords | tailwind, tailwindcss, tailwind-plugin, language-variant, localization, i18n, bn |

## Links

- npm: https://www.npmjs.com/package/@ganmahmud/tailwindcss-language-variant
- Repository: https://github.com/ganmahmud/tailwindcss-language-variant
- Homepage: https://github.com/ganmahmud/tailwindcss-language-variant#readme
- Issues: https://github.com/ganmahmud/tailwindcss-language-variant/issues
- npm.io page: https://npm.io/package/@ganmahmud/tailwindcss-language-variant

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-09-21
- 1.0.0 — 2023-09-20

## README

## Tailwind CSS Language Variant Plugin

This Tailwind CSS plugin adds a new variant called `lang-{language}` that can be used to style elements based on their language. This can be useful for creating multilingual websites or applications.

## Installation

1. Install the plugin using npm or Yarn:

    ```bash
    # Using npm
    npm install -D @ganmahmud/tailwindcss-language-variant

    # Using Yarn
    yarn add -D @ganmahmud/tailwindcss-language-variant
    ```
2. Add the plugin to your `tailwind.config.js` file. The default language is bn (Bangla). You can add as many language as you like using the `language` option in theme configuration.

    ```js
    // tailwind.config.js
    module.exports = {
      theme: {
        language: ['bn', 'en'],
      },
      plugins: [
        require('@ganmahmud/tailwindcss-language-variant'),
      ],
    }
    ```
3. The plugin assumes that you have a `lang` attribute in your HTML tag and it is handles by your application or website. You can then use the `lang-{language}` variant in your HTML like this:

    ```html
    <html lang="bn">
      <body>
        <h1 class="lang-bn:font-bold">Hello world!</h1>
      </body>
    </html>
    ```

    This will result in the following CSS:
    
    ```css
    [lang="bn"] .lang-bn\:font-bold {
        font-weight: 700;
    }
    ```

    ## Changelog
    -  `1.0.1`: Fixed languge config type issue
    -  `1.0.0`: Initial release

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