Theme Variants

In addition to Tailwind CSS variants, there is a theme variant added in Konsta UI to help make custom styles which should be different in iOS and Material theme:

Theme prefixApplied forCSS
iosiOS theme.k-ios ...
materialMaterial theme.k-material ...

For example:

  • Image will have height h-11 (44px) in iOS theme and h-12 (48px) in Material theme

    <img class="ios:h-11 material:h-12" src="..." />
    
  • Text will be bold in iOS theme and semibold in Material theme

    <span class="ios:font-bold material:font-semibold">Hello</span>
    
Code licensed under MIT.
2022 © Konsta UI by nolimits4web.