diff --git a/.changeset/honest-dingos-think.md b/.changeset/honest-dingos-think.md
new file mode 100644
index 0000000000..1305342ffa
--- /dev/null
+++ b/.changeset/honest-dingos-think.md
@@ -0,0 +1,5 @@
+---
+'@graphcommerce/next-ui': patch
+---
+
+Created a cssFlags functionality to allow for conditional rendering based on stored flags in the localStorage
diff --git a/.changeset/rotten-steaks-yawn.md b/.changeset/rotten-steaks-yawn.md
new file mode 100644
index 0000000000..782df3dd53
--- /dev/null
+++ b/.changeset/rotten-steaks-yawn.md
@@ -0,0 +1,5 @@
+---
+"@graphcommerce/next-ui": minor
+---
+
+Add props to DarkLightModeThemeProvider to disable dark/light mode or to change the default ssr mode. Save user chosen mode in localStorage
diff --git a/docs/framework/theming.md b/docs/framework/theming.md
index 061d5c48f0..602ebdb5a6 100644
--- a/docs/framework/theming.md
+++ b/docs/framework/theming.md
@@ -246,6 +246,12 @@ width, borderRadius and margin. Performance-wise, font-size and line-height
should not be scaled with responsiveVal. To learn more, look into
[responsive font sizes](../framework/typography.md).
+## Disabling darkmode or lightmode site wide
+
+Remove light={lightTheme} or dark={darkTheme} from the
+`` in \_app.tsx to disable darkmode or lightmode
+site wide.
+
## Next steps
- Learn about [icons](../framework/icons.md) in GraphCommerce
diff --git a/examples/magento-graphcms/pages/_document.tsx b/examples/magento-graphcms/pages/_document.tsx
index 26a35dab3f..4dcb8893e7 100644
--- a/examples/magento-graphcms/pages/_document.tsx
+++ b/examples/magento-graphcms/pages/_document.tsx
@@ -1,7 +1,7 @@
import { normalizeLocale } from '@graphcommerce/lingui-next'
import { withLingui } from '@graphcommerce/lingui-next/document/withLingui'
import type { LinguiDocumentProps } from '@graphcommerce/lingui-next/document/withLingui'
-import { EmotionCacheProps, withEmotionCache } from '@graphcommerce/next-ui'
+import { EmotionCacheProps, getCssFlagsInitScript, withEmotionCache } from '@graphcommerce/next-ui'
import NextDocument, { Html, Head, Main, NextScript } from 'next/document'
class Document extends NextDocument {
@@ -9,6 +9,7 @@ class Document extends NextDocument {
return (
+ {getCssFlagsInitScript()}
{/* Inject MUI styles first to match with the prepend: true configuration. */}
{this.props.emotionStyleTags}
diff --git a/packages/magento-customer/components/SignOutForm/signOut.ts b/packages/magento-customer/components/SignOutForm/signOut.ts
index 8557aaac17..27da5ca095 100644
--- a/packages/magento-customer/components/SignOutForm/signOut.ts
+++ b/packages/magento-customer/components/SignOutForm/signOut.ts
@@ -1,6 +1,8 @@
import { ApolloClient } from '@graphcommerce/graphql'
+import { removeCssFlag } from '@graphcommerce/next-ui'
export function signOut(client: ApolloClient