Skip to content

Search the guides, deployment pages, and API reference.

combine

import { combine } from "@pitlane/theme";
function combine<Fns>(...fns): CombinedTVAFn<Fns>;

Composes tva components, like cva's compose. Each input resolves independently against the shared props, the results deep-merge in argument order, and one css call produces the descriptor. The result accepts the union of the inputs' props and honors each input's own defaults.

Type Parameters

Fns

Fns extends readonly TVAFn<VariantShape>[]

Parameters

fns

...Fns

Returns

CombinedTVAFn<Fns>

See

CombinedTVAFn

Example

export let pillButton = combine(button, rounded);
<button mix={pillButton({ intent: "primary", pill: true })} />;