87 |
88 | ```
89 |
90 | ## Important
91 |
92 | Due to the static and island based nature of Astro, a lot of Shadcn components won't work out of the box,
93 | some components such as the Avatar require more work on your side to enable them to work (see `src/components/Avatar.tsx`).
94 |
95 | You can find useful information on this from the following links:
96 |
97 | - [Issues with Astro Islands when using Shadcn](https://github.com/shadcn-ui/ui/issues/2249)
98 | - [Abstract components into react, ts components](https://github.com/shadcn-ui/ui/issues/2890)
99 |
--------------------------------------------------------------------------------
/src/pages/index.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Layout from '../layouts/Layout.astro';
3 | import '@/styles/globals.css';
4 |
5 | import { buttonVariants } from "@/components/ui/button";
6 | import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card";
7 | import { AvatarComponent } from "../components/Avatar.tsx";
8 | import Footer from '@/components/Footer.astro';
9 |
10 | ---
11 |
12 |
13 |
14 |
15 | Astro x Shadcn Starter Template
16 |
17 |
18 |
19 |
20 | Getting Started
21 | Your new project is ready to go!
22 |
23 |
24 |