<%= render_component_header title: "Tooltip", description: "A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it." %> <% content_for :preview, flush: true do %>
<%= render_code_preview('tooltip') %>
<% end %> <% content_for :code, flush: true do %>
<%= code_partial("tooltip/preview", :erb) %>
<% end %> <%= render_preview %>

Installation

<%= code_sample(language: "sh") do %> rails generate shadcn-ui tooltip <% end %>

Usage

<%= code_partial("tooltip/usage", :erb) %> <%= render_usage("tooltip") %>