Spinner
Render a loading indicator
yarn add @tamagui/spinner
or
yarn add tamagui
yarnnpmbunpnpm
import { Spinner, YStack } from 'tamagui'export function SpinnerDemo() {return (<YStack padding="$3" space="$4" alignItems="center"><Spinner size="small" color="$green10" /><Spinner size="large" color="$orange10" /></YStack>)}
Features
Custom size "small" or "large".
Accepts all theme colors.
Accepts all YStack props.
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" />
API Reference
Spinner
Spinner extends YStack, getting Tamagui standard props, plus:
Props
size
"small" | "large"
color
string | ColorTokens
Give the spinner a color.