Spinner

free

Spinner signals that a component or page is loading while work is in progress.

Loading data
import Spinner from '@/components/ui/spinner';

export default function UsageDemo() {
  return (

Installation

Add this component with the NateUI CLI.

npx nateui@latest add Spinner

Examples

Basic

import Spinner from '@/components/ui/spinner';

export default function BasicDemo() {
  return <Spinner />;

Size

import Spinner from '@/components/ui/spinner';

export default function SizeDemo() {
  return (

Color

Loading results
Syncing changes
Cancelling order
import Spinner from '@/components/ui/spinner';

export default function ColorDemo() {
  return (

Custom Indicator

import Spinner from '@/components/ui/spinner';
import { PiCircleNotch } from 'react-icons/pi'

export default function CustomIndicatorDemo() {

Static

import Spinner from '@/components/ui/spinner';

export default function StaticDemo() {
  return (

API

Spinner renders the default arc indicator by default, or any icon component passed to indicator. Color follows the current text color, so a text color utility on className restyles the graphic.

PropDescriptionTypeDefault
sizeHeight and width of the spinner, in pixels or a CSS size.string | number20
isSpiningWhether the spin animation runs.booleantrue
indicatorComponent rendered in place of the default arc graphic.ElementType-
enableThemeApply the default primary color and theme class.booleantrue
trackClassNameClass for the faint background ring of the default indicator.string-
indicatorClassNameClass for the moving arc of the default indicator.string-
classNameClass names applied to the rendered indicator, including its color.string-
styleInline styles merged with the computed size.CSSProperties-
refRef forwarded to the rendered indicator.Ref<HTMLElement>-
...nativePropsNative props for the rendered indicator element.ComponentProps<ElementType>-