For the complete documentation index, see llms.txt. This page is also available as Markdown.

Theme selector

Theme selector widget

CSPR.click can display a theme selector in the top bar so users can switch between the light and dark themes.

During initialization, your application defines the initial theme with defaultTheme. The CSPR.click UI manages its own theme state internally. When the user asks to change the theme, CSPR.click calls your onThemeChanged callback so your application can update its own page styles.

Theme selector setup

Define a default theme and an onThemeChanged callback in window.clickUIOptions.

The defaultTheme value can be light or dark. Use onThemeChanged to synchronize your application shell, CSS classes, state store, or design system with the theme selected in the CSPR.click top bar.

Last updated