Link Select
A link with a trailing chevron that triggers a Menu โ the chevron flips up and the label underlines (solid) while the menu is open.
| Prop | Type | Default | Notes |
|---|---|---|---|
placement |
String | "bottom-left" |
One of PLACEMENTS โ where the popover anchors relative to the trigger. Default "bottom-left". |
**html_options |
Hash | โ | Extra HTML attributes for the popover `<div class="menu">`. |
Slots: sections trigger
Default
1 | <%= render MenuComponent.new do |m| %> |
2 | <% m.with_trigger { render LinkSelectComponent.new(label: "Sort by") } %> |
3 | <% m.with_section do |s| %> |
4 | <% s.with_item(label: "Newest first", href: "#") %> |
5 | <% s.with_item(label: "Oldest first", href: "#") %> |
6 | <% s.with_item(label: "Most popular", href: "#") %> |
7 | <% end %> |
8 | <% end %> |