Using Tailwind
Last updated
Last updated
This demo show basic usage of tailwind in a Keycloakify login theme.
We show how you can levrage tailwind @apply directive to customize the default style without having to modify the components, just by tagetting the standardized kc classes.
We allso show how to use tailwind the regular way, at the component level on ejected pages.
Before you start with this exemple it is strongly recommended you read the CSS Level Customization guide. This will teach you how to partially or completely disable the stlyes inherited from the default theme.
To use Tailwind in your Keycloakify project start by following the setup guide for Vite.
Beyond that, here is a demo setup of light modification of the starter template to incorporate tailwind:
What has been done:
Ejecting the login.ftl page (npx keycloakify eject-page
and login -> login.ftl) and applying a tailwind class.
Here is the summary of the changes: