infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
49 lines • 1.58 kB
TypeScript
import * as React from "react";
type SkeletonVariant = "rect" | "text" | "title" | "circle";
type SkeletonAnimation = "pulse" | "none";
type SkeletonRounded = "none" | "small" | "medium" | "large" | "full";
export interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
/**
* Visual variant that controls default sizing and shape.
*/
variant?: SkeletonVariant;
/**
* Animation style applied to the skeleton.
*/
animation?: SkeletonAnimation;
/**
* Number of lines to render for text-based skeletons.
*/
lines?: number;
/**
* Optional width overrides for each line.
*/
lineWidths?: Array<number | string>;
/**
* Gap between lines when rendering multiple.
*/
lineGap?: number | string;
/**
* Width of the skeleton block (overrides the variant default).
*/
width?: number | string;
/**
* Height of the skeleton block (overrides the variant default).
*/
height?: number | string;
/**
* Additional class name applied to the container when multiple lines are rendered.
*/
containerClassName?: string;
/**
* Optional inline styles for the container when rendering multiple lines.
*/
containerStyle?: React.CSSProperties;
/**
* Border radius override for rectangular variants.
*/
rounded?: SkeletonRounded;
}
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
export { Skeleton };
//# sourceMappingURL=Skeleton.d.ts.map