Proudly open-source
Our source code is available on GitHub - feel free to read, review, or contribute to it however you want!
The Open Source component provides a beautiful way to showcase your GitHub repository's stars and contributors. Perfect for open-source project landing pages, documentation sites, and portfolio projects.
Installation
Examples
Custom Title and Description
Join our community
PrismUI is built by the community, for the community. We'd love to have you join us!
Different Repository
Built with Next.js
Next.js is the foundation of our framework. Check out their repository to learn more.
Usage
Basic Usage
With GitHub Token
Custom Content
Customization
Custom Styling
Custom Default Stats
Custom Loading State
Notes
- Built with Framer Motion for smooth animations
- Server Component with client-side fallback
- Automatic data fetching with caching
- Responsive design with mobile-first approach
- TypeScript support with proper types
- SSR compatible with "use client" directive
- Optimized performance with proper suspense boundaries
- ARIA attributes for accessibility
- Rate limit aware with proper error handling
Features
- Real-time GitHub stats
- Animated star count
- Contributor avatars with hover effects
- Responsive layout
- Custom content support
- GitHub API integration
- Error handling
- Loading states
- TypeScript support
- SSR compatibility
- Accessibility features
Props
Prop | Type | Description | Default |
---|---|---|---|
repository | string | The GitHub repository in format "owner/repo" | Required |
githubToken | string | Optional GitHub OAuth token for API requests | undefined |
title | string | Custom title text | "Proudly open-source" |
description | string | Custom description text | "Our source code is available..." |
buttonText | string | Custom button text | "Star on GitHub" |
className | string | Additional CSS classes | undefined |