Integrating an Existing Theme into Your Keycloakify Project
Last updated
Last updated
If you have already created a Keycloak theme using the native theming system, you can easily import it into your Keycloakify project.
This process is straightforward and requires no special configuration. Simply copy the source files of your existing theme and place them into the src
directory of your Keycloakify project.
Below is a live demonstration using a login theme, but the same process applies to any type of theme.
If your project includes theme variants, they will also work seamlessly with your imported native theme.
You can leverage a special FreeMarker variable in your .ftl
files to display the active theme variant dynamically:
To customize translations based on the active theme variant, create property files with the following naming pattern:
For example, if you have theme variants named vanilla
and chocolate
, you can override the loginAccountTitle
message key for each variant. Here's an example project structure: