UI Components
UI components are basically shadcn/ui with a little bit of a customization here and there. For more information about specific UI components visit the shadcn/ui documentation. To use any of the components under src/components/ui/
you just import and use. Feel free to customize them to fit your needs
here is an example usage for button component.
---
import {Button} from "@/components/ui/button";
---
<Button variant="outline" size="sm">I am a button</Button>
<Button size="sm">I am also a button</Button>
<Button variant="destructive" size="sm">I am a warning you</Button>
List of shadcn/ui components used
Component | path |
---|---|
Badge | @/components/ui/badge.tsx |
Button | @/components/ui/button.tsx |
DropdownMenu | @/components/ui/dropdown-menu.tsx |
Seperator | @/components/ui/seperator.tsx |
Posts
Recent posts
You can add recent posts to your page by adding the following code
---
import RecentPosts from "@/components/post/RecentPosts.astro";
---
<RecentPosts count={2} />
result:
Posts by Year
You can add recent posts to your page by adding the following code
---
import PostsByYear from "@/components/post/PostsByYear.astro"
---
<PostsByYear />
result: