<c-ui.spinner />
{% cotton ui.spinner /%}
Spinners come in sizes from size="xs" to size="2xl", defaulting to md.
<c-ui.spinner size="xs" />
<c-ui.spinner size="sm" />
<c-ui.spinner size="md" />
<c-ui.spinner size="lg" />
<c-ui.spinner size="xl" />
<c-ui.spinner size="2xl" />
{% cotton ui.spinner size="xs" /%}
{% cotton ui.spinner size="sm" /%}
{% cotton ui.spinner size="md" /%}
{% cotton ui.spinner size="lg" /%}
{% cotton ui.spinner size="xl" /%}
{% cotton ui.spinner size="2xl" /%}
Use the color prop to set the spinner color. The current option inherits the text color of its parent, making it easy to match surrounding content.
<c-ui.spinner color="accent" />
<c-ui.spinner color="zinc" />
<div class="text-rose-500">
<c-ui.spinner color="current" />
</div>
{% cotton ui.spinner color="accent" /%}
{% cotton ui.spinner color="zinc" /%}
<div class="text-rose-500">
{% cotton ui.spinner color="current" /%}
</div>
| Name | Description | Type | Options | Default |
|---|---|---|---|---|
size |
Spinner size from xs to 2xl. | str |
xssmmdlgxl2xl
|
md |
color |
Spinner color. Use 'current' to inherit the parent's text color. | str |
accentzincwhitecurrent
|
accent |
class |
Additional CSS classes merged onto the spinner. | str | — |