One set of status classes for every component that takes a colour: .mdst-danger, .mdst-success, .mdst-warning, and .mdst-info. Works on button, badge, tag, banner, toast, progress, and OTP input. Set --mdst-tone to make your own.
Tones
| Class | Example |
|---|---|
| .mdst-danger |
3
Failed
|
| .mdst-success |
3
Paid
|
| .mdst-warning |
3
Pending
|
| .mdst-info |
3
Draft
|
Info uses the text colour unless you set --mdst-color-info. A tone colours only the element
it's on, not the elements inside it, so a close button inside a danger banner stays a plain button.
Usage
<!-- One class, any component -->
<button class="mdst-danger">Delete</button>
<span class="mdst-badge mdst-success">3</span>
<span class="mdst-tag mdst-tag--subtle mdst-warning">Pending</span>
<div class="mdst-banner mdst-info">…</div>
<progress class="mdst-danger" value="30" max="100"></progress>
<!-- Combines with each component's variants -->
<button class="mdst-button--solid mdst-danger">Delete</button>
/* Your own tone */
.brand { --mdst-tone: rebeccapurple; }