No results
1
Spinner
Byron edited this page 2026-10-02 23:24:49 +02:00
Table of contents
Basic
<CleanSpinner Spinning />
Custom
Tip
You can update
CleanSpinner.Defaultto override the spinner for every rendered spinners. Spinners who have an explicitSpinnerContentparameter are not affected.
<CleanSpinner SpinnerContent="@(Icons.Home)" Spinning />
CleanSpinner.Default = Icons.Home;
With child content
<CleanSpinner Spinning id="spinner">
<CleanAlert>
<TitleContent>
A very useless alert
</TitleContent>
<ChildContent>
It's probably very hard to read this text when the spinning indicator is shown.
</ChildContent>
</CleanAlert>
</CleanSpinner>
<CleanButton class="mbs-md" onclick="updateSpinning()">
Toggle spinning
</CleanButton>
<script>
function updateSpinning() {
// This would be the same as updating the `Spinning` parameter, but I wanted to show an example that works in the Static rendering mode.
document.getElementById('spinner')?.classList.toggle('spinner-spinning');
}
</script>