variants option is an array of variant declarations. When twind encounters a variant that matches a variant declaration it will call the resolver function with the match and the current context.
Twind already includes some default variants:
darkfor dark mode
- screen variants based on the
- all simple pseudo classes like
Dynamic Variants allow to create variants based on the current match and context. The next example create a
There are some more options and helpers available to create variants. You can find more examples in the official presets: