%= render_component_header title: "Toast",
description: "A succinct message that is displayed temporarily." %>
<% content_for :preview, flush: true do %>
<%= render_button "Trigger Toast", variant: "outline", data: {controller: "ui--toast", action: "ui--toast#trigger", target: "#default_toast"} %>
<%= render_code_preview('toast') %>
<% end %>
<% content_for :code, flush: true do %>
<%= code_partial("toast/preview", :erb) %>
<% end %>
<%= render_preview %>
Installation
<%= code_sample(language: "sh") do %>
rails generate shadcn-ui toast
<% end %>
Usage
<%= code_partial("toast/usage", :erb) %>
<%= render_usage("toast") %>
<% content_for :examples, flush: true do %>
<%= render_button "Trigger Destructive Toast", variant: "outline", data: {controller: "ui--toast", action: "ui--toast#trigger", target: "#alert_toast"} %>
<%= render "examples/components/toast/code/destructive" %>
<% end %>
<% content_for :code, flush: true do %>
<%= code_partial("toast/destructive", :erb) %>
<% end %>
<%= render_example %>