code/tamagui.dev/data/docs/components/spinner/2.0.0.mdx
<Highlights features={[ 'Custom size "small" or "large".', 'Accepts all theme colors.', 'Accepts all YStack props.', ]} />
Spinner is already installed in tamagui, or you can install it independently:
npm install @tamagui/spinner
Note that due to the fact that Spinner is an extension of React Native ActivityIndicator, and that only accepts size small or large, we are currently limited to just these sizes.
import { Button, Spinner } from 'tamagui'
export default () => <Spinner size="large" color="$green10" />
Spinner extends YStack, getting Tamagui standard props, plus:
<PropsTable
data={[
{
name: 'size',
required: false,
type: '"small" | "large"',
description: Size of the spinner.,
},
{
name: 'color',
required: false,
type: 'string | ColorTokens',
description: Gives the spinner a color.,
},
]}
/>