Steps allow you to create a series of steps that users can follow to complete a task. This is useful for onboarding, form completion, and many more.
Steps are automatically numbered and connected with lines. You can utilize colors to indicate progress through the steps.
= daisy_steps do |steps|
- steps.with_step(title: "Write Code", css: "step-primary")
- steps.with_step(title: "Release Code", css: "step-primary")
- steps.with_step(title: "Profit", css: "step-secondary")
- steps.with_step(title: "Rule the World")
You can also display steps vertically.
= daisy_steps(css: "steps-vertical") do |steps|
- steps.with_step(title: "Write Code", css: "step-primary")
- steps.with_step(title: "Release Code", css: "step-primary")
- steps.with_step(title: "Profit", css: "step-secondary")
- steps.with_step(title: "Rule the World")
You can customize the content of each step to include any (short) content
you want by using the number
option.
You can also supply this via the data-content
attribute in the html.
= daisy_steps do |steps|
- steps.with_step(html: { data: { content: "❤️" } })
And you can alter the colors by supplying CSS for the after
pseudo-element. Note that you may need to use the !important
modifier to override the default styles.