Neutral container surface.
Pages
Contents
6. Components
Buttons
Buttons have semantic colour variants and four sizes (--xs, --sm, --md, --lg).
| <button class="xpulse-button xpulse-button--primary xpulse-button--sm">Primary SM</button> |
| <button class="xpulse-button xpulse-button--danger xpulse-button--lg">Delete</button> |
| <button class="xpulse-button xpulse-button--ghost">Ghost</button> |
| <a class="xpulse-button xpulse-button--info xpulse-button--block" href="#">Full Width</a> |
Cards & Boxes
Positive feedback.
Warnings and reviews.
Errors and destructive processes.
| <article class="xpulse-card xpulse-card--info"> |
| <header class="xpulse-card__header">Header</header> |
| <div class="xpulse-card__content">Content</div> |
| <footer class="xpulse-card__footer">Footer</footer> |
| </article> |
Tables
| Component | Status | Note |
|---|---|---|
| Theme Route | Ready | Loaded from /_theme/app.css |
| Warning Palette | Review | Use sparingly |
| Error Flow | Critical | Only for destructive actions |
| Plain Row | Normal | No contextual colour |
| <table class="xpulse-table xpulse-table--lined xpulse-table--striped"> |
| <tbody> |
| <tr class="xpulse-table__row--info">...</tr> |
| <tr class="xpulse-table__row--warning">...</tr> |
| <tr class="xpulse-table__row--danger">...</tr> |
| </tbody> |
| </table> |
Code
Inline: const state = "online"; and --xpulse-accent
| 1 | import theme from '@xpulse/theme'; |
| 2 | await theme.init(); |
| 3 | console.log(theme.href('app')); |
| <code class="xpulse-code">inline code</code> |
| <div class="xpulse-code-block">...</div> |
Forms
| <fieldset class="xpulse-fieldset"> |
| <legend class="xpulse-legend">Group</legend> |
| <label class="xpulse-label"> |
| Name<br> |
| <input class="xpulse-input" type="text" /> |
| <span class="xpulse-help">Help text</span> |
| </label> |
| <textarea class="xpulse-textarea" rows="4"></textarea> |
| <input class="xpulse-input" type="color" /> |
| </fieldset> |
All components automatically respond to the current theme tokens. New components should always use tokens before writing custom styles.