π¨βπ»π¨π» Quick start
yarn add keycloakify @emotion/react"scripts": {
"keycloak": "yarn build && build-keycloak-theme",
}yarn keycloak # generates the keycloak-theme.jarimport { KcApp, defaultKcProps, getKcContext } from "keycloakify";
//We assume the file contains: ".my-class { color: red; }"
import "./index.css";
const { kcContext } = getKcContext();
if( kcContex === undefined ){
throw new Error(
"This app is a Keycloak theme" +
"It isn't meant to be deployed outside of Keycloak"
);
}
reactDom.render(
<KcApp
kcContext={kcContext}
{...{
...defaultKcProps,
"kcHeaderWrapperClass": "my-class",
}}
/>,
document.getElementById("root"),
);

How to import the theme in Keycloak
Last updated
Was this helpful?