Spinner
로딩 상태를 표시하는 인디케이터입니다.
Loading data...
설치
사용법
import { Spinner } from "@/components/ui/spinner"<Spinner />커스터마이징
Spinner 컴포넌트를 수정해 기본 스피너 아이콘을 다른 아이콘으로 교체할 수 있습니다.
import { LoaderIcon } from "lucide-react"
import { cn } from "@/lib/utils"
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
return (
<LoaderIcon
role="status"
aria-label="Loading"
className={cn("size-4 animate-spin", className)}
{...props}
/>
)
}
export { Spinner }예제
Size
Use the size-* utility class to change the size of the spinner.
Button
버튼에 스피너를 추가해 로딩 상태를 표시합니다. 앞쪽에는 data-icon="inline-start", 뒤쪽에는 data-icon="inline-end"와 함께 <Spinner />를 배치하세요.
Badge
배지에 스피너를 추가해 로딩 상태를 표시합니다. 앞쪽에는 data-icon="inline-start", 뒤쪽에는 data-icon="inline-end"와 함께 <Spinner />를 배치하세요.
SyncingUpdatingProcessing
Input Group
Empty
Processing your request
Please wait while we process your request. Do not refresh the page.
RTL
RTL 지원을 활성화하려면 RTL 설정 가이드를 참고하세요.
جاري معالجة الدفع...
١٠٠.٠٠ دولار