Command palette

@yasinsensoy/web

Web · Components

Spinner

Spinning loading indicator.

2 exports

Live example

Preview

Code

import { Spinner } from "@yasinsensoy/web";

<Spinner className="size-4 text-primary" />

Events

  1. Events appear here when you interact with the preview.

Import

import { Spinner } from "@yasinsensoy/web";

Spinner

componentServer component

Spinning loading indicator. Inherits its size and color from the text; can be changed with size-* and text-* classes. Spins slower with the "reduced motion" preference.

Spinner({ label: labelProp, className, ...props }: SpinnerProps): JSX.Element

Examples

<Spinner />
<Spinner className="size-6 text-primary" label="Fetching results" />

SpinnerProps

interface

Props of the Spinner component.

Extends: ComponentProps<"svg">

NameTypeDefaultDescription
label?string | nullthe `loading` text (`"Yükleniyor"`)Text read to screen readers. If the spinner is only decorative (e.g. inside a button that already says "Saving"), pass null.