Files
WorkRoot-WRNexusJSComponent/app/pages/dark-mode.wrn
T

18 lines
1.9 KiB
Plaintext

page DarkModeGuide {
layout = "showcase"
seo {
title = "Dark mode"
description = "Choose light, dark, or system mode. The selection persists and updates every preview."
}
view {
<article class="page-docs guide-page">
<nav class="docs-breadcrumbs" aria-label="Breadcrumb"><a href="/docs">Docs</a><span aria-hidden="true">/</span><span>Dark mode</span></nav>
<header class="docs-intro"><span class="showcase-eyebrow">Customization</span><h1>Dark mode</h1><p>Choose light, dark, or system mode. The selection persists and updates every preview.</p></header>
<section class="guide-section"><h2>Overview</h2><p>Choose light, dark, or system mode. The selection persists and updates every preview.</p></section><section class="guide-section"><h2>Configuration</h2><p>Use the design switcher in the header to test this setting live.</p></section><section class="guide-section"><h2>Component behavior</h2><p>The setting is inherited by components, blocks, templates, and playground previews.</p></section>
<section class="guide-section"><h2>Use semantic colors in both modes</h2><p>Use shared surface, text, border and focus tokens instead of hard-coded white and black. Check disabled, hover, selected and error states in both themes using the appearance control.</p><pre><code>.panel <span>&#123;</span> background: var(--wrn-color-surface); color: var(--wrn-color-text); border: 1px solid var(--wrn-color-border); <span>&#125;</span></code></pre><h3>Verify the result</h3><p>Open the matching component page, change its options, and try the keyboard controls. Copy the demonstrated configuration into your page, then replace sample content with your data.</p></section>
<nav class="guide-next"><a href="/components/button">Explore components <span aria-hidden="true">→</span></a><a href="/block-library">Browse blocks <span aria-hidden="true">→</span></a></nav>
</article>
}
}