Spectra v0.1

Components / toast

Priority 2

Toast

Back to docs

Toasts are lightweight feedback surfaces. Spectra provides the toast content structure; pair it with cards and position helpers to pin messages where you need them.

Toast API

ClassUsed forNotes
.sp-toastSingle toast bodyGrid wrapper with max width and internal gap tokens.
.sp-toast-stackStack of toastsUse when multiple messages can appear together.
.sp-toast__rowTop row layoutSpaces the title area and close action.
.sp-toast__titleHeadingSemibold title with tighter tracking.
.sp-toast__bodyMessage copyBody text block for the main feedback.
.sp-toast__closeDismiss actionUsually paired with a small ghost button.

Preview

Inline stack

Saved

Your theme preference was stored locally.

Build queued

Spectra will finish packaging after the current task ends.

Position helper pairing

Published

Your docs bundle is ready to deploy.

Typical markup

<div class="sp-pos-bottom-right">
  <article class="sp-card sp-card--elev sp-toast">
    <div class="sp-card__body">
      <div class="sp-toast__row">...</div>
    </div>
  </article>
</div>

Guidance

Keep toast copy brief and actionable. If the message needs paragraphs, decisions, or deep form content, it probably wants a drawer or modal instead.