The Filter component is a group of radio buttons where choosing one option hides the others and shows a reset button.
The basic filter component takes an options
array and uses a div element
with radio buttons styled as buttons.
You can also provide options as a hash with values and labels to customize the display.
You can customize the styles of the buttons and reset button using CSS classes.
= daisy_filter(name: "priorities", css: "items-center") do |f|
- f.with_reset_button(css: "btn-accent btn-sm rounded-full")
- f.with_option(label: "Low", css: "btn-outline btn-success")
- f.with_option(label: "Medium", css: "btn-outline btn-warning")
- f.with_option(label: "High", css: "btn-outline btn-error")
Filters can be used within forms to submit the selected value.
Create virtual credit / debit cards to keep your real info safe.
Get $5 when you sign up — free to start!
Everything you need to grow your business with confidence!
CRM, Lead Generation, Project Management, Contracts, Online Payments, and more!
The ads above are affiliate links to products I regularly use and highly
recommend.
I may receive a commission if you decide to purchase.