- Accordion
- Alert
- Avatar PRO
- Avatar Group PRO
- Badge
- Blank Slate PRO
- Breadcrumb
- Breakpoint Debug PRO
- Button
- Button Group
- Callout PRO
- Card
- Carousel
- Close Button
- Container
- Copy to Clipboard PRO
- Divider PRO
- Dropdown
- Errors PRO
- Feed PRO
- Flash PRO
- Form Field PRO
- Header PRO
- Heading
- Heading with Anchor PRO
- List Group
- Modal
- Nav
- Navbar
- Offcanvas
- Pagination
- Pricing Panel PRO
- Progress
- Progress Circular PRO
- Rating Group PRO
- Ribbon PRO
- Spinner
- Stat PRO
- Stepper PRO
- Table
- Table of Contents PRO
- Team Member PRO
- Testimonial PRO
- Toast
Spinner
Description
Indicates loading or processing activity within your appliaction.
FREE
This component is available for free.
It implements the Bootstrap Spinner component.
See the installation instructions below for more details.
Arguments
Name | Default | Type | Description |
---|---|---|---|
style
|
border
|
String
|
Can be of the style border or grow
Options: border , grow
|
color
|
primary
|
String
|
The color variant of the alert component |
html_attributes
|
{}
|
Hash
|
Any attributes for the used html wrapper tag |
Examples
Border
<%= render Railsboot::SpinnerComponent.new %>
<%= render Railsboot::SpinnerComponent.new(color: "secondary") %>
<%= render Railsboot::SpinnerComponent.new(color: "success") %>
<%= render Railsboot::SpinnerComponent.new(color: "danger") %>
<%= render Railsboot::SpinnerComponent.new(color: "warning") %>
<%= render Railsboot::SpinnerComponent.new(color: "info") %>
<%= render Railsboot::SpinnerComponent.new(color: "light") %>
<%= render Railsboot::SpinnerComponent.new(color: "dark") %>
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-secondary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-success" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-danger" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-warning" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-dark" role="status">
<span class="visually-hidden">Loading...</span>
</div>
Grow
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "primary") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "secondary") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "success") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "danger") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "warning") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "info") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "light") %>
<%= render Railsboot::SpinnerComponent.new(style: "grow", color: "dark") %>
<div class="spinner-grow text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-secondary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-success" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-danger" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-warning" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-grow text-dark" role="status">
<span class="visually-hidden">Loading...</span>
</div>
Installation
Simply download this component with all its related files and assets. Unpackage the downloaded ZIP-file, copy all relevant files into your app and adapt the things you need. The ZIP-folder contains:
- A parent component class (
app/components/railsboot/component.rb
) of which all components inherit from. - A base component class (
app/components/railsboot/base_component.rb
) which is used for rendering internally. - The desired component itself (
app/components/railsboot/spinner_component.rb
). - A view template (
app/components/railsboot/spinner_component.html.erb
) for the component unless it's rendered inline. - Any other dependent components such as Slots (just if the component needs those)
- Any dependent assets (JS-Files, CSS-Files) (just if the component needs those)
- A test file for the components (
test/components/railsboot/spinner_component_test.rb
) including potential slot or dependency tests.
For more information please refer to the installation section.
Download
Download the component and its related files (e.g. templates, assets, slots etc.), unpackage the zip file and adapt the things you need.