-
Notifications
You must be signed in to change notification settings - Fork 7
Spinner
Mika Berglund edited this page Feb 28, 2020
·
5 revisions
The Spinner component is used to indicate a loading state of a UI element or page.
Spinner
: ColoredBootstrapComponentBase
Name | Type | Description |
---|---|---|
ContentAlignment | ContentAlignment? | Specifies how to align child content in your spinner. |
Size | SpinnerSize | The size of the spinner. Defaults to SpinnerSize.Normal . |
Type | SpinnerType | The type of spinner. Defaults to SpinnerType.Border . |
The Spinner component extends the ColoredBootstrapComponentBase
base class, so all parameters defined on that class are also available on the Spinner
component, like the Color
property.
Shows you how you can create spinners with different sizes and types.
<Spinner Size="SpinnerSize.Normal" Type="SpinnerType.Border" />
<Spinner Size="SpinnerSize.Normal" Type="SpinnerType.Grow" />
<Spinner Size="SpinnerSize.Small" Type="SpinnerType.Border" />
<Spinner Size="SpinnerSize.Small" Type="SpinnerType.Grow" />
You can use the standard Bootstrap colours with your spinners.
<Spinner Color="NamedColor.Primary" />
<Spinner Color="NamedColor.Secondary" />
<Spinner Color="NamedColor.Success" />
<Spinner Color="NamedColor.Danger" />
<Spinner Color="NamedColor.Warning" />
<Spinner Color="NamedColor.Info" />
<Spinner Color="NamedColor.Light" />
<Spinner Color="NamedColor.Dark" />
Shows you how to add content to your spinner.
<Spinner ContentAlignment="ContentAlignment.Left">
Loading... (left aligned)
</Spinner>
<Spinner ContentAlignment="ContentAlignment.Right">
Loading... (right aligned)
</Spinner>
Shows how to use the spinner inside of a Button
component.
@code {
bool saving;
}
<Button
Color="NamedColor.Primary"
IsDisabled="@this.saving"
OnClicked="() => this.saving = true">
@if(this.saving)
{
<Spinner
Size="SpinnerSize.Small"
MarginRight="Spacing.One" />
}
<span>Save</span>
</Button>
- Home
- Design Principles
- Getting Started
- Components
- Content
- Layout Components
- Generic Elements
- Utilities
- Releases