Socket
Book a DemoInstallSign in
Socket

@macklinu/cx

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@macklinu/cx

A utility for creating className strings

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
0
Created
Source

cx

A utility for creating className strings

Installation

pnpm add @macklinu/cx

Usage

This is a combination of two libraries that I always use with Tailwind:

  • clsx
  • tailwind-merge
import { cx } from '@macklinu/cx'

cx('foo', 'bar') // 'foo bar'

// say state === 'loading'
cx('bg-red', 'text-white', state === 'loading' && 'is-loading') // 'bg-red text-white is-loading'

cx() // ''

FAQs

Package last updated on 13 Jan 2025

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