%= render_component_header title: "Dropdown Menu", description: "Displays a menu to the user — such as a set of actions or functions — triggered by a button." %> <%= content_for :preview, flush: true do %> <% render_dropdown_menu do %> <%= dropdown_menu_trigger do %> <%= render_button "Open Dropdown", variant: :outline %> <% end %> <%= dropdown_menu_content do %> <%= dropdown_menu_label "My Account" %> <%= render_separator class: "my-1" %> <%= dropdown_menu_item "Profile" %> <%= dropdown_menu_item do %> Billing ⌘B <% end %> <%= dropdown_menu_item "Settings" %> <% end %> <% end %> <% end %> <% content_for :code, flush: true do %> <%= code_partial("dropdown-menu/preview", :erb) %> <% end %> <%= render_preview %>