Progress component
fysk/progressFreeComponent
Progress component
Install it
npx shadcn@latest add https://fysk.dev/r/progress.jsonSource
1"use client"23import * as React from "react";4import * as ProgressPrimitive from "@radix-ui/react-progress";5import { cva, type VariantProps } from "class-variance-authority";6import { CheckCircle2, XCircle, Loader2 } from "lucide-react";78import { cn } from "@/lib/utils";9import { useFyskConfig } from "@/components/fysk-provider";10import { useFyskAnimation } from "@/components/hooks/useFyskAnimation";1112const progressVariants = cva(13 "relative w-full overflow-hidden bg-secondary transition-all duration-500",14 {15 variants: {16 size: {17 xs: "h-1",18 sm: "h-2",19 md: "h-4",20 lg: "h-6",21 xl: "h-8",22 },23 shape: {24 rounded: "rounded-full",25 square: "rounded-none",26 soft: "rounded-md",27 },28 variant: {29 default: "",30 gradient: "",31 striped: "",32 glow: "",33 glass: "backdrop-blur-sm bg-background/20 border border-border/50",34 neon: "shadow-lg",35 },36 state: {37 idle: "bg-secondary",38 loading: "bg-secondary",39 success: "bg-green-500/20",40 error: "bg-destructive/20",41 },42 },43 defaultVariants: {44 size: "md",45 shape: "rounded",46 variant: "default",47 state: "idle",48 },49 }50)5152const indicatorVariants = cva(53 "h-full w-full flex-1 transition-all duration-1000",54 {55 variants: {56 variant: {57 default: "bg-primary",58 gradient: "bg-gradient-to-r from-primary via-primary/80 to-primary",59 striped: "bg-primary bg-striped-indicator animate-stripe-move",60 glow: "bg-primary shadow-[0_0_10px_rgba(var(--primary),0.5)]",61 glass: "bg-primary/60 backdrop-blur-sm",62 neon: "bg-gradient-to-r from-primary to-secondary shadow-[0_0_15px_rgba(var(--primary),0.8)]",63 },64 state: {65 idle: "",66 loading: "",67 success: "bg-green-500",68 error: "bg-destructive",69 },70 },71 defaultVariants: {72 variant: "default",73 state: "idle",74 },75 }76)7778// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from fysk
All 18 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Avataravatar | fysk | Components | Free | 2 deps | |
| Badgebadge | fysk | Components | Free | 1 dep | |
| Buttonbutton | fysk | Components | Free | 2 deps | |
| Empty Stateempty | fysk | Components | Free | 2 deps | |
| Formform | fysk | Components | Free | 4 deps | |
| fysk-providerfysk-provider | fysk | Components | Free | 2 deps | |
| Inputinput | fysk | Components | Free | 1 dep | |
| Input OTPinput-otp | fysk | Components | Free | no deps |
