How to get dark mode in plugin

Hi,

how can my plugin find out whether its in darkmode? Or more generally: how can i read the current users preferences? is there a hook or so?

Hi, the following will return either “light” or “dark”:

window.localStorage?.STRAPI_THEME
1 Like