Spinners are used to notify users that their action is being processed. For loading state, spinners should only be used for content that can't be represented with skeleton loading components, like for data charts.
<script lang="ts" setup>
import { Spinner } from '@returnless/focus-ui';
</script>
<template>
<Spinner />
</template><script lang="ts" setup>
import { Spinner } from '@returnless/focus-ui';
</script>
<template>
<Spinner variant="light" />
</template>SVGs are often conveyed inconsistently to assistive technologies. The Spinner component's accessibility is also highly contextual. When the parent component is focusable, you'll need to set the hasFocusableParent prop for the appropriate role attribute to be applied.
For optimal user experience, use the accessibilityLabel prop to let assistive technology users know the purpose of the spinner.
The spinner component should:
Spinner accessibility labels should: