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.
Programmatic, accessible status updates with dismiss buttons and safe text rendering.
Trigger actual JavaScript notifications for success, warning, information and danger. Ensure messages remain comprehensible without color.
<div class="xsh-ref-flex"><button class="xsh-btn xsh-btn-soft" data-xsh-toast="Changes saved" data-xsh-toast-type="success" type="button">Success</button><button class="xsh-btn xsh-btn-soft" data-xsh-toast="Check the form" data-xsh-toast-type="warning" type="button">Warning</button><button class="xsh-btn xsh-btn-soft" data-xsh-toast="Update available" data-xsh-toast-type="info" type="button">Information</button><button class="xsh-btn xsh-btn-soft" data-xsh-toast="Unable to save" data-xsh-toast-type="danger" type="button">Danger</button></div>Use data-xsh-toast on a button or Xshna.toast(message,{type:"success",duration:4500}). Supported types: info, success, warning, danger.
<div class="xsh-flex xsh-gap-3 xsh-flex-wrap">
<button class="xsh-btn xsh-btn-primary" data-xsh-toast="Changes saved successfully" data-xsh-toast-type="success">Show success toast</button>
<button class="xsh-btn xsh-btn-secondary" data-xsh-toast="Review the required fields" data-xsh-toast-type="warning">Show warning</button>
</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-toast | Core component | CSS + optional behavior |
.xsh-toast-stack | Composable modifier / structure class | CSS + optional behavior |
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.