Skeletons
Below is the full output of the Skeletons component across all variants and sizes.
“Its Important to install the packages & Dependencies to use can intall using
npm install zure-uiand also paste code maunallyFor both React & Next Js“
1. Variants
These define the intent and visual weight of the Input.
Preview
Paragraph
Table
Text
Card
2. Example
Made an example for better understanding in which i have created an template how it can be used in your project while Loading.
Important Note “I have used
tailwindcssyou can use normalCSS”
Click the Refresh button to check the refresh effect
Preview
Paragraph
Table
Text
Card
Props
Skeleton
| Prop | Type | Default | Description |
|---|---|---|---|
width | string | number | "100%" | Width of the skeleton block. Can be px, %, etc. |
height | string | number | "20px" | Height of the skeleton block. |
borderRadius | string | number | "4px" | Border radius for rounded corners. |
className | string | "" | Additional Tailwind/Custom classes. |
style | React.CSSProperties | {} | Inline styles override. |
Installation
You can
Integrate Zure UIBy 2 waysnpm install zure-uiOr byManually creating folder, files & paste the given code ItTotally depends on your workflow.
NPM
NPM
Step 1: Create a React App
Open your terminal and run the following command to create a new React app:
npx create-react-app my-appStep 2: Navigate to Your Project Directory
After creating your project, navigate to your project directory:
cd my-appStep 3: Install the Package
Run the following command in your project root to add the library as a dependency.
npm install zure-uiStep 4: Start Building
You can now import any component directly into your React files.
import { Skeleton, SkeletonCard, SkeletonText, SkeletonTable } from 'zure-ui';
function App() {
return
<h2>Basic Skeleton</h2>
<Skeleton width="200px" height="20px" />
<h2>Text Skeleton</h2>
<SkeletonText lines={4} />
<h2>Card Skeleton</h2>
<SkeletonCard />
<h2>Table Skeleton</h2>
<SkeletonTable rows={4} cols={3} />
}