---
title: "cx"
description: "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."
url: "https://pitlane.tools/package/theme/function/cx"
---

# cx

```ts
import { cx } from "@pitlane/theme";
```

```ts
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`](https://pitlane.tools/package/theme/type/ClassValue.md)\[\]

## Returns

`string`

## See

[ClassValue](https://pitlane.tools/package/theme/type/ClassValue.md)

## Example

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