Progress
solid-ui/progressFreeComponent
A progress component
Live preview
live · rendered by the registry
Rendered by solid-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.solid-ui.com/r/progress.jsonSource
1import type { Component, JSX, ValidComponent } from "solid-js"2import { splitProps } from "solid-js"34import type { PolymorphicProps } from "@kobalte/core/polymorphic"5import * as ProgressPrimitive from "@kobalte/core/progress"67import { Label } from "~/registry/ui/label"89type ProgressRootProps<T extends ValidComponent = "div"> =10 ProgressPrimitive.ProgressRootProps<T> & { children?: JSX.Element }1112const Progress = <T extends ValidComponent = "div">(13 props: PolymorphicProps<T, ProgressRootProps<T>>14) => {15 const [local, others] = splitProps(props as ProgressRootProps, ["children"])16 return (17 <ProgressPrimitive.Root {...others}>18 {local.children}19 <ProgressPrimitive.Track class="relative h-2 w-full overflow-hidden rounded-full bg-secondary">20 <ProgressPrimitive.Fill class="h-full w-[var(--kb-progress-fill-width)] flex-1 bg-primary transition-all" />21 </ProgressPrimitive.Track>22 </ProgressPrimitive.Root>23 )24}2526const ProgressLabel: Component<ProgressPrimitive.ProgressLabelProps> = (props) => {27 return <ProgressPrimitive.Label as={Label} {...props} />28}2930const ProgressValueLabel: Component<ProgressPrimitive.ProgressValueLabelProps> = (props) => {31 return <ProgressPrimitive.ValueLabel as={Label} {...props} />32}3334export { Progress, ProgressLabel, ProgressValueLabel }
What it pulls in
npm packages
Other registry items
Files it writes
More from solid-ui
All 55 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | solid-ui | Components | Free | 2 deps | |
| Alertalert | solid-ui | Components | Free | 3 deps | |
| Alert Dialogalert-dialog | solid-ui | Components | Free | 2 deps | |
| Aspect Ratioaspect-ratio | solid-ui | Components | Free | 1 dep | |
| Avataravatar | solid-ui | Components | Free | 2 deps | |
| Badgebadge | solid-ui | Components | Free | 2 deps | |
| Badge Deltabadge-delta | solid-ui | Components | Free | 2 deps | |
| Bar Listbar-list | solid-ui | Components | Free | 1 dep |
