Flowbite::Spinner
Renders a loading spinner.
Basic usage
<%= render(Flowbite::Spinner.new) %>
With a custom style and size
<%= render(Flowbite::Spinner.new(style: :success, size: :lg)) %>
Examples
Styles
Use these spinner styles to match the surrounding context.
Sizes
Control the size of the spinner.
Custom Styling
Add custom classes to the spinner icon.
API reference
Flowbite
Constructor
def initialize(class: nil, message: "Loading...", size: :default, style: :brand, **options)
Parameters
class |
String, Array<String> | Additional CSS classes for the spinner icon. |
|---|---|---|
message |
String | Text for screen readers announcing the loading state. |
options |
Hash | Additional HTML options for the container element. |
size |
Symbol | The size of the spinner (:xs, :sm, :default, :lg, :xl). |
style |
Symbol | The color style of the spinner (:brand, :danger, :success, :warning). |
See also
Ruby API documentation forclass Flowbite::Spinner