Skip to content

A tiny utility function to join tailwind psuedo classes together.

License

Notifications You must be signed in to change notification settings

Chakravarthy7102/tailwind-psuedo

Repository files navigation

tailwind-psuedo

A tiny utility function to join tailwind psuedo classes to together.

Installation

npm

npm install tailwind-psuedo

yarn

yarn add tailwind-psuedo

bun

bun add tailwind-psuedo

How to use?

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:

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>

Contributing

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.

License

Licensed under the MIT license.

About

A tiny utility function to join tailwind psuedo classes together.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published