progress
neobrutalui/progressFreeComponent
Visualize task completion progress with a percentage indicator.
Live preview
live · rendered by the registry
Rendered by neobrutalui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalui.live/r/progress.jsonSource
1"use client"23import * as React from "react"4import { Progress as BaseProgress } from "@base-ui/react/progress"56import { cn } from "@/lib/utils"78type ProgressProps = React.ComponentPropsWithoutRef<typeof BaseProgress.Root> & {9 showValue?: boolean10}1112const Progress = React.forwardRef<13 React.ComponentRef<typeof BaseProgress.Root>,14 ProgressProps15>(({ className, value, showValue = true, ...props }, ref) => {16 const percentage = value ?? 01718 return (19 <BaseProgress.Root20 ref={ref}21 value={value}22 className={cn("relative w-full pt-10", className)}23 {...props}24 >25 {showValue && (26 <div27 className="absolute top-0 -translate-x-1/2 transition-[left] duration-300 motion-reduce:transition-none"28 style={{ left: `${percentage}%` }}29 >30 <span className="relative inline-flex items-center rounded-base border-2 border-black bg-white px-2 py-0.5 text-xs font-medium text-black">31 {percentage}%32 <svg33 className="absolute -bottom-2 left-1/2 -translate-x-1/2"34 width="10"35 height="8"36 viewBox="0 0 10 8"37 fill="none"38 aria-hidden="true"39 >40 <path d="M5 8L0 0H10L5 8Z" className="fill-black" />41 <path42 d="M0 0L5 8L10 0"43 stroke="black"44 strokeWidth="2"45 strokeLinejoin="round"46 />47 </svg>48 </span>49 </div>50 )}51 <BaseProgress.Track className="relative h-3 w-full overflow-hidden rounded-base border-2 border-black bg-white">52 <BaseProgress.Indicator className="h-full bg-main transition-[width,transform] duration-300 motion-reduce:transition-none" />53 </BaseProgress.Track>54 </BaseProgress.Root>55 )56})57Progress.displayName = "Progress"5859const ProgressLabel = React.forwardRef<60 React.ComponentRef<typeof BaseProgress.Label>,61 React.ComponentPropsWithoutRef<typeof BaseProgress.Label>62// … truncated
What it pulls in
npm packages
Other registry items
More from neobrutalui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalui | Components | Free | 2 deps | |
| alertalert | neobrutalui | Components | Free | 1 dep | |
| avataravatar | neobrutalui | Components | Free | no deps | |
| badgebadge | neobrutalui | Components | Free | 1 dep | |
| buttonbutton | neobrutalui | Components | Free | 1 dep | |
| cardcard | neobrutalui | Components | Free | no deps | |
| checkboxcheckbox | neobrutalui | Components | Free | 2 deps | |
| date-pickerdate-picker | neobrutalui | Components | Free | 2 deps |
