agentset / rules
agentset-ai/agentset/.cursor/rules/shadcn.mdc
Shadcn UI Components
Cursor rule2.1k starsChanged 8 months ago
---
description: Shadcn UI Components
globs: apps/web/**/*.ts,apps/web/**/*.tsx,packages/ui/**/*.ts,packages/ui/**/*.tsx
alwaysApply: false
---
# Shadcn UI Components
This project uses @shadcn/ui for UI components. These are beautifully designed, accessible components that you can copy and paste into your apps.
## Finding and Using Components
Components are available in the `packages/ui/src/components/ui` directory, following the aliases configured in `packages/ui/components.json`
## Using Components
Import components from the ui directory using the configured aliases:
```tsx
import { Button } from "@agentset/ui"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@agentset/ui"
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@agentset/ui"
```
Example usage:
```tsx
<Button variant="outline">Click me</Button>
<Card>
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card Description</CardDescription>
</CardHeader>
<CardContent>
<p>Card Content</p>
</CardContent>
<CardFooter>
<p>Card Footer</p>
</CardFooter>
</Card>
```
## Installing Additional Components
Many more components are available but not currently installed. You can view the complete list at https://ui.shadcn.com/r
To install additional components, use the Shadcn CLI:
```bash
npx shadcn@latest add [component-name]
```
For example, to add the Accordion component:
```bash
npx shadcn@latest add accordion
```
Note: `npx shadcn-ui@latest` is deprecated, use `npx shadcn@latest` instead
Some commonly used components are
- Accordion
- Alert
- AlertDialog
- AspectRatio
- Avatar
- Calendar
- Checkbox
- Collapsible
- Command
- ContextMenu
- DataTable
- DatePicker
- Dropdown Menu
- Form
- Hover Card
- Menubar
- Navigation Menu
- Popover
- Progress
- Radio Group
- ScrollArea
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Switch
- Table
- Textarea
- Toast
- Toggle
- Tooltip
## Component Styling
This project uses the "new-york" style variant with the "neutral" base color and CSS variables for theming, as configured in `components.json`.
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

