Skeleton
solid-ui/skeletonFreeComponent
A skeleton 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/skeleton.jsonSource
1import type { ValidComponent } from "solid-js"2import { splitProps } from "solid-js"34import type { PolymorphicProps } from "@kobalte/core/polymorphic"5import * as SkeletonPrimitive from "@kobalte/core/skeleton"67import { cn } from "~/lib/utils"89type SkeletonRootProps<T extends ValidComponent = "div"> =10 SkeletonPrimitive.SkeletonRootProps<T> & { class?: string | undefined }1112const Skeleton = <T extends ValidComponent = "div">(13 props: PolymorphicProps<T, SkeletonRootProps<T>>14) => {15 const [local, others] = splitProps(props as SkeletonRootProps, ["class"])16 return (17 <SkeletonPrimitive.Root18 class={cn("bg-primary/10 data-[animate='true']:animate-pulse", local.class)}19 {...others}20 />21 )22}2324export { Skeleton }
What it pulls in
npm packages
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 |
