Semantic structure
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.
Avatar initials, photos, stacks and flexible media objects.
Provide a meaningful alternate text for an image avatar, or use decorative initials where identity is described alongside it.
<div class="xsh-ref-flex"><span class="xsh-avatar xsh-avatar-sm" aria-label="Alex">AL</span><span class="xsh-avatar" aria-label="Morgan">MR</span><span class="xsh-avatar xsh-avatar-lg" aria-label="Taylor">TY</span><span class="xsh-avatar-stack"><span class="xsh-avatar">AL</span><span class="xsh-avatar">MR</span><span class="xsh-avatar">TY</span></span></div>Use xsh-avatar and xsh-avatar-stack. For real photos include appropriate alt text where the image conveys identity.
<div class="xsh-flex xsh-items-center xsh-gap-4"><span class="xsh-avatar">AW</span><span class="xsh-avatar xsh-avatar-lg">RS</span><div class="xsh-avatar-stack"><span class="xsh-avatar">AA</span><span class="xsh-avatar">BB</span><span class="xsh-avatar">+2</span></div></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-avatar | Core component | CSS-only |
.xsh-avatar-lg | Composable modifier / structure class | CSS-only |
.xsh-avatar-sm | Composable modifier / structure class | CSS-only |
.xsh-avatar-stack | 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.