Skip to content
HomeCobalt

Spinner

Says that something is being read, in the slot where the answer will land, for people who see and for people who listen.

Examples

A search whose answer has no known shape, with the 24px ring alone where the results go once the wait passes 250ms, named for what it waits on; the box holds the results' height.
In a cardA card searching, with one status line in the results' place until they arrive.
Events this week

    Usage

    Use it when

    • A wait longer than the slow-wait delay whose answer has no known shape, such as a search still running.
    • A control waiting on its own action, through StateButton, which places the ring in the control's box.

    Use something else when

    • A button is waiting on its own press. Use StateButton instead, which keeps the box and the name.
    • The shape of the answer is known. Use Skeleton instead.
    • The amount done is known. Use Progress instead.
    • The answer is known to be none. Use Empty instead.

    Rules

    General

    Content

    Avoid

    Install

    npx shadcn@latest add https://kaanarici.com/r/cobalt/spinner.json
    import { Spinner } from "@/components/cobalt/ui/spinner"