Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unocss/extractor-arbitrary-variants

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/extractor-arbitrary-variants

Extractor arbitrary variants for utilities

  • 0.53.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
221K
increased by0.22%
Maintainers
1
Weekly downloads
 
Created

What is @unocss/extractor-arbitrary-variants?

@unocss/extractor-arbitrary-variants is a package designed to work with UnoCSS, a utility-first CSS framework. This package allows you to extract and apply arbitrary variants to your CSS classes, enabling more dynamic and flexible styling options.

What are @unocss/extractor-arbitrary-variants's main functionalities?

Arbitrary Variants Extraction

This feature allows you to extract arbitrary variants from a given string. In this example, the 'hover:bg-red-500' variant is extracted and logged.

import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';

const variants = extractorArbitraryVariants('hover:bg-red-500');
console.log(variants); // Output: ['hover:bg-red-500']

Integration with UnoCSS

This feature demonstrates how to integrate the arbitrary variants extractor with UnoCSS. By adding the extractor to the UnoCSS configuration, you can enable the use of arbitrary variants in your project.

import { defineConfig } from 'unocss';
import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';

export default defineConfig({
  extractors: [
    extractorArbitraryVariants(),
  ],
});

Other packages similar to @unocss/extractor-arbitrary-variants

Keywords

FAQs

Package last updated on 26 Jun 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc