Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function cx
import { cx } from "https://deno.land/x/frugal@0.5.0/packages/loader_style/styled.ts";

generates a className string from a list of string and Rules. This function is able to skip "empty" values (undefined or null). This function also handle booleans, enabling constructs like boolean && rule.

Parameters

...classNames: CX[]

Returns

string