/**
* UI Components Example
*
* This file demonstrates how to use all the UI components in the design system.
* Each component is shown with various props and configurations.
*/
import React from 'react';
import {
Button,
Card,
CardHeader,
CardBody,
CardFooter,
CardImage,
Container,
Grid,
GridItem,
Badge,
BadgeGroup,
Loading,
LoadingButton,
LoadingSkeleton,
} from './index';
// Example Icons (using simple SVG)
const ArrowRightIcon = () => (
);
const CheckIcon = () => (
);
const StarIcon = () => (
);
// Button Examples
export const ButtonExamples = () => (
Buttons
{/* Primary Buttons */}
} iconPosition="right">With Icon
{/* Secondary Buttons */}
}>Success
{/* Outline Buttons */}
}>With Icon
{/* Ghost Buttons */}
);
// Card Examples
export const CardExamples = () => (
Cards
{/* Basic Card */}
This is a basic card with elevated variant. It includes a header, body content, and footer.
{/* Card with Image */}
Cards can include images for visual appeal.
{/* Bordered Card */}
}
action={New}
/>
This card has a strong border and includes an icon in the header.
{/* Hoverable Card */}
Hover over this card to see the effect!
React
TypeScript
Tailwind
);
// Container Examples
export const ContainerExamples = () => (
Containers
Default Container (max-width: lg, padding: lg)
Medium Container (max-width: md, padding: md)
Fluid Container (full width)
);
// Grid Examples
export const GridExamples = () => (
Grid System
{/* Basic Grid */}
12-column responsive grid:
{[1, 2, 3, 4, 5, 6, 7, 8].map((item) => (
{item}
))}
{/* Grid with Span */}
Grid with column spans:
Span 2 columns
1 column
1 column
Span 2 columns
{/* Responsive Grid */}
Responsive (1 col mobile, 2 tablet, 3 desktop):
{[1, 2, 3, 4, 5, 6].map((item) => (
Item {item}
))}
);
// Badge Examples
export const BadgeExamples = () => (
Badges
{/* Badge Variants */}
Color Variants:
Primary
Secondary
Success
Warning
Error
Info
Neutral
{/* Badge Sizes */}
Sizes:
Small
Medium
Large
{/* Badges with Icons */}
With Icons:
}>Success
} iconPosition="right">Star
}>Next
{/* Rounded Badges */}
);
// Loading Examples
export const LoadingExamples = () => (
Loading Components
{/* Spinner Sizes */}
{/* Spinner Variants */}
{/* Loading with Text */}
{/* Loading Button */}
{/* Loading Skeleton */}
);
// Combined Example - Full Page Layout
export const FullPageExample = () => (
{/* Header Section */}
UI Components Showcase
A comprehensive design system for your Next.js application
{/* Hero Card */}
}
/>
This design system provides a complete set of reusable components
that follow modern design principles and accessibility standards.
} iconPosition="right">
Get Started
{/* Feature Grid */}
Features
} />
Works perfectly on all devices from mobile to desktop.
Ready
} />
Follows WCAG guidelines with proper ARIA attributes.
WCAG 2.1
} />
Fully typed with TypeScript for better developer experience.
TypeScript
{/* Action Section */}
Ready to start building?
}>Star on GitHub
React
Next.js
TypeScript
Tailwind CSS
);
// Main Export - All Components
export const AllComponentsExample = () => {
return (
);
};
export default AllComponentsExample;