Socket
Socket
Sign inDemoInstall

@unocss/extractor-arbitrary-variants

Package Overview
Dependencies
1
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/extractor-arbitrary-variants


Version published
Maintainers
1
Created

Package description

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

Readme

Source

@unocss/extractor-arbitrary-variants

Exactor to support arbitrary variants for utilities.

Documentation

Please refer to the documentation.

License

MIT License © 2022-PRESENT Anthony Fu

Keywords

FAQs

Last updated on 25 Aug 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc