Skip to content

Search the guides, deployment pages, and API reference.

cx

import { cx } from "@pitlane/theme";
function cx(...inputs): string;

clsx-compatible className joiner for interop with plain stylesheets, since mix and className compose on the same element. Strings and numbers join with spaces, falsy values drop, arrays flatten, and truthy object keys join.

Parameters

inputs

...ClassValue[]

Returns

string

See

ClassValue

Example

<span className={cx("mono", isAlias && "alias-tag")} />;