<%= render_component_header title: "Input", description: "Displays a form input field or a component that looks like an input field." %> <% content_for :preview, flush: true do %>
<%= render_code_preview('input') %>
<% end %> <% content_for :code, flush: true do %> <%= code_partial("input/preview", :erb) %> <% end %> <%= render_preview %>

Installation

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

Usage

<%= code_partial("input/usage", :erb) %> <%= content_for :examples, flush: true do %> <%= render_input name: "sample_input", id: "sample_input", variant: :borderless %> <% end %> <% content_for :code, flush: true do %> <%= code_partial("input/borderless", :erb) %> <% end %> <%= render_example %>