Built with care.
Composable surface, title and supporting copy.
Read reference ↗Cards group related information and actions. Choose interactive semantics only when the entire surface triggers one action.
Each card retains semantic content and composition. The modifier changes presentation, not interaction semantics. Interactive cards still need real links or buttons.
Composable surface, title and supporting copy.
Read reference ↗Composable surface, title and supporting copy.
Read reference ↗Composable surface, title and supporting copy.
Read reference ↗Composable surface, title and supporting copy.
Read reference ↗Composable surface, title and supporting copy.
Read reference ↗<div class="xsh-ref-flex"><article class="xsh-card xsh-card-interactive xsh-ref-card"><span class="xsh-ref-label">INTERACTIVE</span><h3>Built with care.</h3><p>Composable surface, title and supporting copy.</p><a href="../pages/cards.html">Read reference ↗</a></article><article class="xsh-card xsh-card-borderless xsh-ref-card"><span class="xsh-ref-label">BORDERLESS</span><h3>Built with care.</h3><p>Composable surface, title and supporting copy.</p><a href="../pages/cards.html">Read reference ↗</a></article><article class="xsh-card xsh-card-inset xsh-ref-card"><span class="xsh-ref-label">INSET</span><h3>Built with care.</h3><p>Composable surface, title and supporting copy.</p><a href="../pages/cards.html">Read reference ↗</a></article><article class="xsh-card xsh-card-glass xsh-ref-card"><span class="xsh-ref-label">GLASS</span><h3>Built with care.</h3><p>Composable surface, title and supporting copy.</p><a href="../pages/cards.html">Read reference ↗</a></article><article class="xsh-card xsh-card-feature xsh-ref-card"><span class="xsh-ref-label">FEATURE</span><h3>Built with care.</h3><p>Composable surface, title and supporting copy.</p><a href="../pages/cards.html">Read reference ↗</a></article></div>A reusable content structure with clear action placement. Avoid clickable wrappers around other interactive children.
Place descriptions, charts, media or user controls here. Keep card actions distinct.
<article class="xsh-card xsh-ref-wide-card"><header class="xsh-card-header"><strong>Workspace report</strong><span class="xsh-badge xsh-badge-success">Ready</span></header><div class="xsh-ref-card-body"><h3>Operational overview</h3><p>Place descriptions, charts, media or user controls here. Keep card actions distinct.</p></div><footer class="xsh-card-footer"><button type="button" class="xsh-btn xsh-btn-primary xsh-btn-sm" >Export report</button><button type="button" class="xsh-btn xsh-btn-ghost xsh-btn-sm" >Dismiss</button></footer></article>The following semantic HTML uses shipped class names. Interactive application behavior, when required, is provided by the optional JavaScript layer or your application.
Adaptive composition
Inset treatment
<div class="xsh-app xsh-grid xsh-grid-cols-2 xsh-gap-4"><article class="xsh-card xsh-card-interactive"><h3 class="xsh-h3">Projects</h3><p>Adaptive composition</p></article><article class="xsh-card xsh-card-inset"><h3 class="xsh-h3">Activity</h3><p>Inset treatment</p></article></div>Place dist/xshna.min.css in your site's assets directory. For declarative interactive components, also load dist/xshna.min.js with defer. Individual icon assets are available as SVG files in dist/icons/svg/. Copy the files you use, or deploy the complete icon directory. No Node.js is required on the hosting server.
Relevant names or configuration points for this pattern are documented below. Names are composable; not every combination implies a distinct behavior.
| Selector, attribute or file | Role |
|---|---|
xsh-card | Configuration or reusable building block |
xsh-card-interactive | Configuration or reusable building block |
xsh-card-inset | Configuration or reusable building block |
xsh-card-feature | Configuration or reusable building block |
xsh-card-borderless | Configuration or reusable building block |
xsh-card-glass | Configuration or reusable building block |
Prefer intrinsic sizing, grid or flexible wrapping. Test minimum viewport widths of 320px, 375px and 768px, and narrow component containers. Long labels must wrap or be truncated intentionally without making essential content unavailable.
For stateful controls, apply the correct native disabled, required, checked or aria attributes. States must be conveyed in text or accessible names, rather than by color alone. Avoid nesting interactive elements inside interactive controls.
Use the native semantic HTML element first: a button for an action, a link for navigation, a label associated with each input and a real table for tabular data. Keyboard interaction should preserve visible focus and predictable Tab order. Inspect the rendered UI with actual assistive technology before certifying accessibility.
Apply data-xsh-theme for light/dark/high-contrast themes, data-xsh-design for a Design DNA personality and data-xsh-density for comfortable or dense presentations. Prefer logical properties so the pattern works when the document direction changes.
Respect prefers-reduced-motion and provide a static presentation for content that would otherwise depend on animation. A personality is a coordinated visual preset, not a guarantee that arbitrary custom colors satisfy WCAG contrast requirements.
This pattern is built from static classes. Use Xshna Extract for application-specific CSS reduction, or ship the complete distribution when simplicity matters more than transfer size. Application data, authentication and persistence remain the responsibility of your application.
If styles are missing, confirm that the CSS URL resolves and the root has class="xsh-app". For missing icons, verify that the self-hosted SVG files exist under dist/icons/svg/ and that image paths resolve correctly. If a dynamic class disappears after extraction, add the class to the Extract safelist and regenerate the bundle.
This reference applies to Xshna.css 1.0.0-beta.2. Beta APIs may change. See the accompanying release notes and test report for verified browser coverage and known limitations.
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-card | Core component | CSS-only |
.xsh-card-borderless | Composable modifier / structure class | CSS-only |
.xsh-card-feature | Composable modifier / structure class | CSS-only |
.xsh-card-footer | Composable modifier / structure class | CSS-only |
.xsh-card-glass | Composable modifier / structure class | CSS-only |
.xsh-card-header | Composable modifier / structure class | CSS-only |
.xsh-card-inset | Composable modifier / structure class | CSS-only |
.xsh-card-interactive | Composable modifier / structure class | CSS-only |
.xsh-card-title | Composable modifier / structure class | CSS-only |
A card is a container, not automatically a link.
Compose existing xsh- classes on the appropriate HTML element. Keep content order meaningful when CSS is disabled.
If the full card is interactive, ensure a single coherent focus target.
Load xshna.min.js only if the documented interaction needs it. Your application remains responsible for data, persistence and business rules.
Avoid nesting actionable elements inside a wrapping button or anchor.
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.