%= render "layouts/documentation/component_header",
title: "Card",
description: "Displays a card with header, content, and footer." %>
<%= content_for :preview, flush: true do %>
<%= render_card body: "The Most Basic of Cards" %>
<%= render_card title: "Did you know?", body: "You can embed any HTML in the body of a card by
yielding to a block for the body?", subtitle: "This is important.", footer: "Have a great day!" %>
<% end %>
<% content_for :code, flush: true do %>
<%= code_partial("card/code/preview", :erb) %>
<% end %>
<%= render_preview %>
Installation
<%= code_sample(language: "sh") do %>
rails generate shadcn-ui card
<% end %>
Usage
<%= code_partial("card/code/usage", :erb) %>
<%= render_usage("card") %>
<% content_for :examples, flush: true do %>
<%= render "examples/components/card/code/form" %>
<% end %>
<% content_for :code, flush: true do %>
<%= code_partial("card/code/_form", :erb) %>
<% end %>
<%= render_example %>
<% content_for :examples, flush: true do %>
<%= render "examples/components/card/code/notifications" %>
<% end %>
<% content_for :code, flush: true do %>
<%= code_partial("card/code/_notifications", :erb) %>
<% end %>
<%= render_example %>