Introduction
useSpiroKitTheme hook
SpiroKit comes with a handy hook called useSpiroKitTheme that allows you to customize your app to match your brand.
You will need to use this hook during the setup of the
SpiroKitProvideras described here
You can optionally pass a Theme object to the useSpiroKitTheme hook to setup your preferences like so:
// Step 1. Define your theme preferences
const theme = useSpiroKitTheme({
// Theme object
});
export default function App() {
return (
// Step 2. Assign your theme
<SpiroKitProvider theme={theme}>...</SpiroKitProvider>
);
}
Theme object
{
"config": {
"colors": {
"primary": "indigo",
"primaryGray": "neutralGray",
"primaryDark": "neutralDark"
},
"fonts": {
"body": "Poppins",
"heading": "Poppins"
},
"initialColorMode": "light",
"useSystemColorMode": true
},
"resources": {
"colors": {
// Your custom colors go here
},
"fonts": {
// Your custom fonts go here
}
}
}
Let's take a look at all the available customizations: