styles
Compiler-only StyleX-inspired declarations: each named style becomes a
class name, its variants picked by data attributes in the class list,
class={[sheet.card, { size: 'large' }]} (docs/styles.md#variants).
Usage
Styling: one compiler, two entry points
import classes from './screen.css';
import { styles, VStack, Text } from 'kuito';
const sheet = styles({
card: { padding: 16, backgroundColor: '#17263b', borderRadius: 12 },
});
export function Card() {
return (
<VStack class={classes.panel}>
<Text class={sheet.card}>Hi</Text>
</VStack>
);
}Signatures
<T extends Record<string, StyleRule>>(_rules: T): { [K in keyof T]: string; }Type parameters
| Name | Constraint | Default |
|---|---|---|
T | Record<string, StyleRule> | — |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_rules | T | Yes | — |
Returns
{ [K in keyof T]: string; }
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.