Skeleton

PreviousNext

A skeleton component for React Native applications.

Docs
nativeuiui

Preview

Loading preview…
registry/skeleton/skeleton.tsx
import React from "react";
import { View } from "react-native";
import { cn } from "@/lib/utils";

interface SkeletonProps extends React.ComponentPropsWithoutRef<typeof View> {
  className?: string;
}

function Skeleton({ className, ...props }: SkeletonProps) {
  return (
    <View
      className={cn("animate-pulse rounded-md bg-primary/10", className)}
      {...props}
    />
  );
}

export { Skeleton };

Installation

npx shadcn@latest add @nativeui/skeleton

Usage

import { Skeleton } from "@/components/ui/skeleton"
<Skeleton />