A tiny utility function to join tailwind psuedo classes to together.
npm
npm install tailwind-psuedo
yarn
yarn add tailwind-psuedo
bun
bun add tailwind-psuedo
To use the library, simply import it into your jsx/tsx file and call the twPsuedo() function with an object of pseudo element styles. For example:
import { twPsuedo } from "tailwind-psuedo";
export function Button(){
return <button className={twPsuedo({
after: 'bg-red-400 text-white border-xl'
)}>Click Me</button>
}
Which will be translated into below code while run time.
<button class="after:bg-red-400 after:text-white after:border-xl">Click Me</button>
Here's how you can contribute:
- Open an issue if you believe you've encountered a bug.
- Make a pull request to add new features/make quality-of-life improvements/fix bugs.
Licensed under the MIT license.