Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phthhieu/re-tailwind

Brings TailwindCSS https://tailwindcss.com to ReasonML
https://github.com/phthhieu/re-tailwind

reasonml tailwind tailwind-css

Last synced: about 1 month ago
JSON representation

Brings TailwindCSS https://tailwindcss.com to ReasonML

Awesome Lists containing this project

README

        

# re-tailwind
ReasonML utility to generate Tailwind classes

## Install

```
npm install --save re-tailwind
```

Add re-tailwind to `bs-dependencies` in `bsconfig.json`

## Usage

1. Ensure your app already import tailwind css

```reason
[%bs.raw {|require("tailwindcss/dist/tailwind.min.css")|}];
```

2. Use function TW.make to construct your tailwind classnames:

```reason
module Example = {
[@react.component]
let make = () => {

make)>
{ReasonReact.string("Hello Example")}
;
};
};

```

[More examples](../master/examples)

## Credits
- [Typed tailwind](https://github.com/dvkndn/typed-tailwind) which has the same purpose to this project but in TypeScript

## Next works:
- Tailwind PPX
- Auto generate ReasonML code for Tailwind CSS by user config

## License
[MIT](https://choosealicense.com/licenses/mit)