shadcn/studio is an open-source collection of copy-and-paste shadcn components, blocks, and templates - paired with a powerful theme generator & AI Tools to craft, customize, and ship faster. ๐
Supported by ThemeSelection , with a commitment to empowering the open-source community.
- Table of Contents ๐
- Features โจ
- Project Structure ๐๏ธ
- Quick Start ๐
- Available Commands ๐ง
- Code Formatting ๐จ
- Configuration โ๏ธ
- Dependencies ๐ฆ
- Deployment ๐
- Documentation ๐
- Community ๐ค
- Useful Links ๐
- Social Media ๐
shadcn/ui aims to provide core components with a unique distribution system, allowing developers to copy and paste reusable, customizable UI elements directly into their codebase.
While this approach offers flexibility and control, it comes with some limitations: a lack of diverse component variants examples, limited theme customization options, and limited pre-built blocks. Additionally, its extensive customization options, though powerful, can sometimes feel overwhelming, especially for those seeking a more guided or streamlined experience.
This project showcases a complete business website with sections for Header, Hero, Changelog Timeline,FAQ, and call-to-action components.
- ๐ Built with Astro - Fast, modern static site generation
- ๐จ Shadcn Studio Components - Beautiful, ready-to-use Tailwind CSS components
- ๐ฑ Fully Responsive - Optimized for mobile, tablet, and desktop
- โก Optimized Performance - Fast page loads and excellent SEO
- ๐ง TypeScript Support - Type-safe configuration and development
- ๐ Prettier Integration - Automatic code formatting with Tailwind class sorting
- ๐ Tailwind CSS 4 - Latest Tailwind with modern features
shadcn-studio-astro-template/
โโโ public/ # Public static assets
โ โโโ favicon/ # Favicon files
โ โโโ images/ # Public images
โ โโโ _headers # Netlify Deploy Headers
โ โโโ robots.txt # SEO crawler rules
โ โโโ site.webmanifest # PWA manifest
โ
โโโ src/
โ โโโ assets/ # SVG and other assets
โ โ
โ โโโ components/ # Reusable UI components
โ โ โโโ blocks/ # Block components
โ โ โโโ layout/ # Layout components
โ โ โโโ sections/ # Data of components
โ โ โโโ ui/ # Base UI components
โ โ
โ โโโ layouts/ # Astro layout files
โ โ โโโ BlankLayout.astro # Minimal layout
โ โ โโโ HeadSeo.astro # SEO head layout
โ โ โโโ Layout.astro # Main site layout
โ โ
โ โโโ lib/ # Helper libraries
โ โ โโโ utils.ts # Utility functions
โ โ
โ โโโ pages/ # Route-based pages
โ โ โโโ 404.astro # 404 page
โ โ โโโ index.astro # Home page
โ โ โโโ rss.xml.js # RSS feed generator
โ โ
โ โโโ styles/
โ โ โโโ global.css # Global styles
โ โ
โ โโโ utils/ # Utility functions
โ โ โโโ seo.ts # SEO helpers
โ โโโ consts.ts # Application constants (SEO)
โ
โโโ astro.config.mjs # Astro configuration
โโโ content.config.ts # Content collections config
โโโ .env.example # Environment variable template
โโโ components.json # shadcn/ui config
โโโ package.json # Dependencies & scripts
โโโ tsconfig.json # TypeScript configuration
โโโ vercel.json # Vercel deployment config
- Node.js 18, 20, or 22+
- pnpm (recommended) or npm
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm run dev
The site will be available at
http://localhost:4321 -
Build for production:
pnpm build
The built site will be in the
dist/folder with relative asset paths for easy deployment. -
Preview the production build:
pnpm run preview
The template comes with several pre-configured scripts to help you with development, building, and maintaining your project. All scripts can be run using your package manager of choice (npm, pnpm, yarn, or bun) from the root of the project.
| Command | Action |
|---|---|
dev |
Starts the Astro development server with hot-reload enabled. Your application will be available at http://localhost:4321 |
build |
Creates an optimized production build of your application. This command generates static files and optimizes your code for deployment. |
preview |
Preview production site locally. Use this to test your production build locally before deploying. |
lint |
Runs ESLint to check your code for potential errors and code quality issues. This helps maintain clean and consistent code. |
lint:fix |
Runs ESLint and automatically fixes problems where possible. |
format |
Formats all files using Prettier to ensure consistent code style. |
check-types |
Checks TypeScript types to catch type errors before building or deploying. |
This project uses Prettier for code formatting with the following features:
- Automatic formatting on save in VS Code
- Tailwind CSS class sorting - Classes are automatically sorted in the recommended order
- Extra space removal - Trailing whitespace and extra spaces are removed
- Consistent code style - Enforced across all
.astro,.js,.ts, and.cssfiles
-
Install recommended VS Code extensions (you'll be prompted when opening the project):
- Prettier - Code formatter
- Astro
- Tailwind CSS IntelliSense
- EditorConfig for VS Code
-
Formatting will work automatically on save thanks to:
.prettierrc- Prettier configuration.editorconfig- Editor settings.vscode/settings.json- VS Code workspace settings
-
Manual formatting:
pnpm run format # Format all files
Edit src/consts.ts to customize your site:
export const siteConfig = {
creatorName: 'Shadcn Studio',
demoName: 'Ink',
templateName: 'Blog Landing Page'
// ... more settings
}Configure the site's SEO and global metadata in src/consts.ts. These settings power the HeadSeo.astro layout and seo.ts helpers so pages have correct titles, descriptions, and social previews.
Recommended fields:
siteTitle: The site-wide default title.siteDescription: Default meta description for pages.siteUrl: The canonical base URL for building absolute links.siteLocale: Locale string used for html/lang and Open Graph (e.g.en-US).siteAuthor: Default author/creator name.siteKeywords: Array of SEO keywords.socialImage: Path to the default social preview image (OG/Twitter card).faviconPath: Path to the favicon in/public.themeColor: Theme color meta for browsers and PWA.twitterHandle: Official Twitter/X handle for site cards.analyticsId: Optional analytics measurement id (Google Analytics, Plausible, etc.).
Example siteConfig with SEO fields:
// Example SEO & site settings โ edit src/consts.ts
export const siteConfig = {
siteTitle: 'Ink โ Blog Landing Page',
siteDescription: 'A beautifully crafted Blog and product landing page built with Astro and shadcn/studio.',
siteUrl: 'https://example.com',
siteLocale: 'en-US',
siteAuthor: 'Shadcn Studio',
siteKeywords: ['Blog', 'landing page', 'astro', 'shadcn'],
socialImage: '/images/social-preview.png',
faviconPath: '/favicon/favicon.ico',
themeColor: '#0ea5e9',
twitterHandle: '@ShadcnStudio',
analyticsId: '' // optional
}Tips:
- Keep
siteUrlconsistent with your deployed domain to ensure correct canonical and Open Graph URLs. - Place social preview images in
public/imagesand reference them with absolute paths (e.g./images/social-preview.png).
The production build creates static files with relative asset paths, making it easy to deploy to:
- GitHub Pages
- Netlify
- Vercel
- Any static hosting service
Simply upload the contents of the dist/ folder after running pnpm run build.
For comprehensive documentation, please visit shadcn/studio documentation.
Join the shadcn/studio community to discuss the library, ask questions, and share your experiences:
- ๐ฆ Follow us on Twitter
- ๐ฎ Join us on Discord