@jill64/tailwind-reactions
TypeScript icon, indicating that this package has built-in type declarations

1.2.23Β β€’Β PublicΒ β€’Β Published

@jill64/tailwind-reactions

npm-version npm-license npm-download-month npm-min-size ci.yml website

πŸŒ€ UI effect set for Tailwind CSS

Setup

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('@jill64/tailwind-reactions')
    // ...
  ]
}

Usage

<button class="pop-effect bg-blue-500 text-white px-4 py-2 rounded-full">
  pop-effect
</button>

<input type="text" class="focus-under border-zinc-400 focus:border-blue-600" />
<input
  type="text"
  class="focus-under-2 border-zinc-400 focus:border-blue-600"
/>
<input
  type="text"
  class="focus-under-bold border-zinc-400 focus:border-blue-600"
/>
<input
  type="text"
  class="focus-under-bold-2 border-zinc-400 focus:border-blue-600"
/>

Additional Configuration

You can configure which values are available for this plugin under the focusUnderWidth key in your tailwind.config.js file:

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      focusUnderWidth: {
        5: '5'
        6: '6'
        7: '7'
      }
    }
  }
}

Alternatively, you can use square bracket notation.

Name CSS
focus-under-[n] border-bottom: [n]px
focus-under-bold-[n] border-bottom: [n]px

License

MIT

Package Sidebar

Install

npm i @jill64/tailwind-reactions

Weekly Downloads

10,432

Version

1.2.23

License

MIT

Unpacked Size

7.75 kB

Total Files

5

Last publish

Collaborators

  • jill64