Toastflow
Playground
Headless

Headless Slot

Keep the Toastflow store and replace the toast card markup with your own Vue or Nuxt template.

Use the ToastContainer slot in Vue or Nuxt when you like Toastflow's runtime behavior but need your own card markup.

Basic Slot

App.vue
<ToastContainer v-slot="{ toast, ui }">
  <div v-bind="ui.wrapperProps">
    <article v-bind="ui.getRootProps({ class: 'my-toast' })">
      <strong>{{ toast.title }}</strong>
      <p v-if="toast.description">{{ toast.description }}</p>

      <button v-bind="ui.getCloseProps()">Close</button>
    </article>
  </div>
</ToastContainer>

Actions And Progress

<button
  v-for="button in ui.buttons.items"
  :key="button.id"
  v-bind="ui.getButtonProps(button)"
>
  {{ button.label }}
</button>

What ui Gives You

Accessibility props

wrapperProps and getRootProps() keep structure, roles, labels, and live-region behavior intact.

Dismiss behavior

getCloseProps() wires the button to the correct toast id.

Action buttons

getButtonProps(button) preserves click handling, dismiss-on-click, and ARIA labels.

Progress helpers

progress.* helpers let you keep Toastflow's timer state while drawing your own bar.

Full Examples

The full headless playground below runs in the Vue REPL. It uses the same headlessFiles source as the Live Examples page, so the code and preview stay in one place.

Headless rendering

Trigger six different Toastflow workflows and render each toast through the ToastContainer slot.

Loading Vue REPL...
Copyright © 2026