🖼️Importing assets and fonts
Last updated
Was this helpful?
Last updated
Was this helpful?
For example, you can place foo.png
in src/login/assets
and import it in the template as shown below:
So, this is typically how you would import self hosted font in a Regular React App. Let's imagine you have the following font index CSS file:
You would import it like this:
Unfortunately this approach does not work in Keycloakify.
The workaround consist in including all your @font-face
statements directly in your public/index.html
file.
This is how you would update your index.html file in order to make it work with Keycloakify:
To import resources available in the default theme, you can construct URLs like:
By default, the default CSS assets are imported and applied here in the login theme.
You can see what assets are available under public/keycloak-resources/login/resources
.
If you want to choose which version of the assets to use, refer to .