22 lines
2.8 KiB
Plaintext
22 lines
2.8 KiB
Plaintext
page FrameworkGuidesGuide {
|
|
layout = "showcase"
|
|
seo {
|
|
title = "Framework guides"
|
|
description = "WRNexus components use native HTML semantics and framework component mounts."
|
|
}
|
|
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>Framework guides</span></nav>
|
|
<header class="docs-intro"><span class="showcase-eyebrow">Getting Started</span><h1>Framework guides</h1><p>WRNexus components use native HTML semantics and framework component mounts.</p></header>
|
|
<section class="guide-section guide-example"><h2>Configure and use it</h2><p>This is the smallest useful starting point. Copy it into the indicated application file or run it from the project root, then adjust the documented values for your product.</p><pre><code>bunx wrnexus inspect component Navbar .
|
|
bunx wrnexus typecheck .</code></pre><h3>What changes after this</h3><p>The page depends on public component props, slots, and outputs, so framework upgrades do not depend on private markup.</p></section>
|
|
<section class="guide-section"><h2>Mount components</h2><p>Use the component mount name directly in .wrn views. Props are typed, slots remain server-rendered, and declared outputs reach parent bindings.</p></section><section class="guide-section"><h2>Own page composition</h2><p>Keep application structure in pages and layouts. Use library components for reusable behavior, then add application-specific styles in the owning .wrn file.</p></section><section class="guide-section"><h2>Prefer semantic contracts</h2><p>Choose props, slots, and outputs over selectors that depend on a component's internal markup. This keeps applications compatible with framework upgrades.</p></section><section class="guide-section"><h2>Inspect before integrating</h2><p>Use the CLI component inspector for the exact prop, slot, and output contract, then type-check the finished page.</p></section>
|
|
<section class="guide-section"><h2>Verify the result</h2><p>Type-check the application, inspect the resolved package and styles, and build the production artifact. Test the page at a narrow viewport, with keyboard navigation, and in both color modes before shipping.</p><pre><code>bunx wrnexus typecheck .
|
|
bunx wrnexus inspect packages .
|
|
bunx wrnexus inspect styles .
|
|
bunx wrnexus build .</code></pre><h3>Expected result</h3><p>The commands exit successfully, the build reports the installed UI components and active theme, and the rendered page remains usable before and after hydration.</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>
|
|
}
|
|
}
|