Spinner
Spinner is part of the Actions and feedback group. Loading indicator for pending work and async transitions.
Installation
Section titled “Installation”npx bambiui add spinner --framework reactnpx bambiui add spinner --framework solidnpx bambiui add spinner --framework sveltenpx bambiui add spinner --framework vueimport { Spinner } from "@/components/ui/spinner";
export function Example() { return <Spinner />;}import { Spinner } from "~/components/ui/spinner";
export function Example() { return <Spinner />;}<script lang="ts"> import { Spinner } from "$lib/components/ui/spinner";</script>
<Spinner /><script setup lang="ts">import { Spinner } from "@/components/ui/spinner";</script>
<template> <Spinner /></template>Preview
Section titled “Preview”
Spinner preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use for short indeterminate loading states.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Spinner. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”SpinnerTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-intent-primary-bg--bambi-muted