🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@alexcarpenter/tailwindcss-aria

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alexcarpenter/tailwindcss-aria

TailwindCSS variants to style elements based on aria attribute values.

0.1.1
latest
npm
Version published
Weekly downloads
3
-70%
Maintainers
1
Weekly downloads
 
Created
Source

tailwindcss-aria

TailwindCSS variants to style elements based on aria attributes values.

Installation

$ npm install @alexcarpenter/tailwindcss-aria

Then add the plugin to you tailwind.config.js file:

// tailwind.config.js
module.exports = {
  variants: {
    textColor: ['current'],
    rotate: ['expanded']
  },
  plugins: [
    require('@alexcarpenter/tailwindcss-aria'),
  ],
}

aria-current

Available values: page, step, location, date, time, true, false.

<nav>
  <ul>
    <li>
      <a href="/" class="text-green-700 current:text-green-900">Home</a>
    </li>
    <li>
      <a href="/about" class="text-green-700 current:text-green-900" aria-current="page">About</a>
    </li>
    <li>
      <a href="/contact" class="text-green-700 current:text-green-900">Contact</a>
    </li>
  </ul>
</nav>

aria-expanded

<button aria-expanded="true" class="inline-flex align-items-center space-y-2 bg-gray-700 expanded:bg-gray-900">
  <span>Toggle me</span>
  <svg class="expanded:rotate-180">...</svg>
</button>

LICENSE

MIT

Keywords

tailwindcss

FAQs

Package last updated on 24 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts