Context-aware cards
Adjust the parent's width to change the layout.
Components respond to their own available width, not just the viewport.
Place xsh-auto on a wrapper, and xsh-auto-card on a card; use xsh-auto-media and xsh-auto-actions for responsive child arrangement.
Adjust the parent's width to change the layout.
<div class="xsh-auto">
<article class="xsh-card xsh-auto-card">
<div class="xsh-auto-media xsh-bg-primary-soft xsh-rounded-lg xsh-grid xsh-items-center xsh-p-8">◈</div>
<div class="xsh-stack"><span class="xsh-badge">Autopilot</span><h3 class="xsh-h3">Context-aware cards</h3><p>Adjust the parent's width to change the layout.</p><div class="xsh-auto-actions"><button class="xsh-btn xsh-btn-primary">View details</button></div></div>
</article>
</div>Customize this component through --xsh-* CSS tokens, data-xsh-* configuration attributes and documented xsh-* utilities. Use the optional JavaScript distribution only when an interactive behavior is needed.
These selectors exist in the current distribution. An entry in this table does not imply that arbitrary modifier combinations are meaningful; use the examples above for the intended composition.
| Class | Purpose | Delivery |
|---|---|---|
.xsh-adapt | Core component | CSS-only |
.xsh-adapt-card | Composable modifier / structure class | CSS-only |
.xsh-adapt-grid | Composable modifier / structure class | CSS-only |
.xsh-adapt-table | Composable modifier / structure class | CSS-only |
.xsh-adapt-toolbar | Composable modifier / structure class | CSS-only |
Use the documented Xshna classes with semantic HTML rather than replacing native elements unnecessarily.
Compose existing xsh- classes on the appropriate HTML element. Keep content order meaningful when CSS is disabled.
Verify focus order, disabled behavior and descriptive labels for interactive patterns.
Load xshna.min.js only if the documented interaction needs it. Your application remains responsible for data, persistence and business rules.
Test narrow containers, long translations and user-defined text sizes.
Test 320px-wide viewports, container-constrained instances, keyboard zoom, longer translations and right-to-left text where relevant.
Use --xsh-* CSS variables for theme values and data-xsh-design / data-xsh-density on the xsh-app root.
Prefer design tokens over hard-coded overrides so components remain coherent across personalities.