Runtime: cx, cn, cv

import { const cn: (...styles: Style[]) => Stylecn, const cv: <V extends Record<string, Record<string, Style>> = Record<never, never>>(config: CvConfig<V>) => (props?: CvProps<V>) => string
The plugin replaces the call by a runtime function of class strings: `button({ size: "lg" })` gives the class names.
cv
, const fontSize: Prop<"font-size">
`<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/font-size)
fontSize
, const opacity: Prop<"opacity">
`<opacity-value>`. Chrome 1, Edge 12, Firefox 1, Safari 2, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/opacity)
opacity
, const p: Prop<"padding">
`<'padding-top'>{1,4}`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/padding)
p
} from "cssints" with { type: "cssints" };
const
const button: (props?: CvProps<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}> | undefined) => string
button
=
cv<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}>(config: CvConfig<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}>): (props?: CvProps<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}> | undefined) => string
The plugin replaces the call by a runtime function of class strings: `button({ size: "lg" })` gives the class names.
cv
({
CvConfig<V extends Record<string, Record<string, Style>>>.base?: Style | undefinedbase: function cn(...styles: Style[]): Stylecn(p<readonly [2]>(parts_0: 2): Style
`<'padding-top'>{1,4}`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/padding)
p
(2), fontSize<readonly ["1rem"]>(parts_0: "1rem"): Style
`<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/font-size)
fontSize
("1rem")),
CvConfig<{ size: { sm: Style; lg: Style; }; disabled: { true: Style; false: Style; }; }>.variants?: {
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
} | undefined
variants
: {
size: {
    sm: Style;
    lg: Style;
}
size
: { sm: Stylesm: p<readonly [1]>(parts_0: 1): Style
`<'padding-top'>{1,4}`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/padding)
p
(1), lg: Stylelg: function cn(...styles: Style[]): Stylecn(p<readonly [4]>(parts_0: 4): Style
`<'padding-top'>{1,4}`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/padding)
p
(4), fontSize<readonly ["1.25rem"]>(parts_0: "1.25rem"): Style
`<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math`. Chrome 1, Edge 12, Firefox 1, Safari 1, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/font-size)
fontSize
("1.25rem")) },
disabled: {
    true: Style;
    false: Style;
}
disabled
: { true: Styletrue: opacity<readonly [0.5]>(parts_0: 0.5): Style
`<opacity-value>`. Chrome 1, Edge 12, Firefox 1, Safari 2, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/opacity)
opacity
(0.5), false: Stylefalse: opacity<readonly [1]>(parts_0: 1): Style
`<opacity-value>`. Chrome 1, Edge 12, Firefox 1, Safari 2, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/opacity)
opacity
(1) },
},
CvConfig<{ size: { sm: Style; lg: Style; }; disabled: { true: Style; false: Style; }; }>.defaultVariants?: CvProps<NoInfer<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}>> | undefined
defaultVariants
: { size?: "sm" | "lg" | undefinedsize: "sm", disabled?: boolean | undefineddisabled: false },
CvConfig<{ size: { sm: Style; lg: Style; }; disabled: { true: Style; false: Style; }; }>.compoundVariants?: (CvProps<NoInfer<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}>> & {
    class: Style;
})[] | undefined
Styles added when every value named here is active, and that win over the variants they combine.
compoundVariants
: [{ size?: "sm" | "lg" | undefinedsize: "lg", disabled?: boolean | undefineddisabled: true, class: Styleclass: opacity<readonly [0.3]>(parts_0: 0.3): Style
`<opacity-value>`. Chrome 1, Edge 12, Firefox 1, Safari 2, iOS 1, Android 18. [MDN](https://developer.mozilla.org/docs/Web/CSS/opacity)
opacity
(0.3) }],
}); export const const classes: () => stringclasses = () =>
const button: (props?: CvProps<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}> | undefined) => string
button
({ size?: "sm" | "lg" | undefinedsize: "lg" }); // "_lwugp7 _z6yj9k _1t0bw2x"
export const const off: () => stringoff = () =>
const button: (props?: CvProps<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}> | undefined) => string
button
({ size?: "sm" | "lg" | undefinedsize: "lg", disabled?: boolean | undefineddisabled: true });
export const const bad: () => stringbad = () =>
const button: (props?: CvProps<{
    size: {
        sm: Style;
        lg: Style;
    };
    disabled: {
        true: Style;
        false: Style;
    };
}> | undefined) => string
button
({ size: "xl" }); // error: not a size
Type '"xl"' is not assignable to type '"sm" | "lg" | undefined'.
export const const bad2: (props?: CvProps<Record<never, never>> | undefined) => stringbad2 = cv<Record<never, never>>(config: CvConfig<Record<never, never>>): (props?: CvProps<Record<never, never>> | undefined) => string
The plugin replaces the call by a runtime function of class strings: `button({ size: "lg" })` gives the class names.
cv
({ base: "padding: 1rem" }); // error: a base is a css value, not a CSS string
Type 'string' is not assignable to type 'Style'. Type 'string' is not assignable to type '{ readonly __cssints: "style"; }'.

Slot variants (scv) are not part of 0.1.