Getting Started
Components
- Accordion
- Advanced Toast
- AlertMessage
- ArrowButton
- Arrows
- Avatar
- Backdrop
- Basic Toast
- Breadcrumb
- Button
- CardBackground
- Card
- Carousel
- Chapters
- ChatBody
- ChatButton
- ChatHeader
- ChatInput
- ChatMessageActions
- ChatMessageEditor
- ChatMessage
- ChatTypingIndicator
- ChatWindowCsatPrompt
- ChatWindowQuote
- ChatWindow
- CheckboxSelect
- Checkbox
- Checkboxes
- Chip
- ChoiceExpander
- Clickable
- ContentReview
- Countdown
- CriteriaDates
- CriteriaParticipants
- CriteriaTransports
- Date Field
- Datepicker
- Dropdown
- ElasticHeight
- ExpandableCard
- ExpandableText
- Filter
- FloatingLabelTextField
- Form Control
- Form Label
- Frame
- HamburgerIcon
- Heading
- Image
- JourneyCard
- LayerHeader
- Layer
- Link
- Loader
- Number Field
- PageNavigation
- Pagination
- Paragraph
- Password
- Phone Field
- Popin
- Portal
- ProductThumbnail
- Promises
- Prose
- Radio Group
- RadioSelect
- Radio
- Range
- Scrollbar
- Select
- SidebarLayout
- SliderFrame
- SparkleWrapper
- Spinner
- Switch
- Table
- Tabs
- Tag
- TextField
- Toggle
- Tooltip
- ValidationMessage
import { Spinner } from '@/ui/Spinner';
export function SpinnerDemo() {
return <Spinner className="w-12" />;
}
Installation
npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/spinner.json
Usage
import { Spinner } from '@/docs/lib/ui/spinner';
export function Component() {
return <Spinner className="w-12 h-12" />;
}API Reference
Spinner
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Optional CSS classes to apply to the spinner container for sizing and style |
Notes
- Accessibility: The Spinner includes built-in ARIA attributes (
aria-busy="true",role="alert",aria-live="polite") to announce loading states to screen readers - Animation: Features two animations working together - a rotating SVG spinner and an animated stroke dasharray for smooth visual feedback
- Sizing: Control the spinner size using the
classNameprop with Tailwind width/height utilities (e.g.,w-8,w-12,w-16) - SVG-Based: Renders as an SVG element that scales cleanly at any size without pixelation
- Color Customization: The spinner uses a gray background circle (
#CCCCCC) and black animated stroke. Colors can be customized via CSS by targeting the SVG circles - Loading States: Best used in combination with conditional rendering to show/hide based on loading state