Debug

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Bigger steps than code

Foo

bar

Line 1

Line 2

Line 3

foo.js

function foo() {
return "bar"
}

Bigger code than steps

Variants

Design composable component APIs with variants

Variants are a first-class citizen of Stitches. With multiple variants, compound variants, and default variants, you can design composable component APIs which are typed automatically.

Variants

Define multiple component variants.

Compound Variants

Apply styles only when multiple variants match.

Default Variants

Set a value as the default for each variant.


const Button = styled("button", {
// base styles
variants: {
color: {
gray: {
backgroundColor: "gainsboro",
},
blue: {
backgroundColor: "dodgerblue",
},
},
size: {
md: {
height: "25px",
},
lg: {
height: "35px",
},
},
},
compoundVariants: [
{
color: "blue",
size: "lg",
css: {
backgroundColor: "purple",
},
},
],
defaultVariants: {
color: "gray",
size: "md",
},
})

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Design composable component APIs with variants

Variants are a first-class citizen of Stitches. With multiple variants, compound variants, and default variants, you can design composable component APIs which are typed automatically.

Variants

Define multiple component variants.

Compound Variants

Apply styles only when multiple variants match.

Default Variants

Set a value as the default for each variant.

Default Variants

Set a value as the default for each variant.

Default Variants

Set a value as the default for each variant.

Default Variants

Set a value as the default for each variant.

Default Variants

Set a value as the default for each variant.

Default Variants

Set a value as the default for each variant.


const Button = styled("button", {
// base styles
variants: {
color: {
gray: {
backgroundColor: "gainsboro",
},
blue: {
backgroundColor: "dodgerblue",
},
},
size: {
md: {
height: "25px",
},
lg: {
height: "35px",
},
},
},
compoundVariants: [
{
color: "blue",
size: "lg",
css: {
backgroundColor: "purple",
},
},
],
defaultVariants: {
color: "gray",
size: "md",
},
})