Skip to main content

Global Scripts

To include scripts that need to be loaded globally, you can use the Global attribute of the theme. This attribute takes a component element, and it gets loaded on every page.

Example

theme.ts
const GlobalScripts = () => {
return <>{/* Scripts here */}</>;
};

const theme = createTheme({
//...
Global: GlobalScripts,
// ..
});

export default theme;