Cursor rule
.cursor/rules/ui-components.mdcCursor rules
Quality
54/100
Scores the file, not the repository.Length
379 words
11 headings · 2 code blocksRepository
0
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# UI Components and Design System23## Component Library45- Use shadcn/ui components from `src/components/ui/`6- All UI components are built on Radix UI primitives7- Components follow consistent naming: `Button`, `Card`, `Dialog`, etc.8- Import components from their individual files, not from index910## Available UI Components1112- **Button**: `Button` with variants (default, destructive, outline, secondary, ghost, link)13- **Card**: `Card`, `CardHeader`, `CardContent`, `CardFooter`14- **Form**: `Input`, `Label`, `Textarea`, `Select`, `Checkbox`15- **Feedback**: `AlertDialog`, `Dialog`, `Toast` (via sonner)16- **Layout**: `Separator`, `ScrollArea`, `Tabs`17- **Data**: `Badge`, `Avatar`, `Skeleton`1819## Styling Guidelines2021- Use Tailwind CSS for all styling22- Follow mobile-first responsive design23- Use CSS variables for consistent spacing and colors24- Maintain consistent component spacing and sizing2526## Button Variants2728```typescript29// Available button variants30<Button variant="default">Default</Button>31<Button variant="destructive">Delete</Button>32<Button variant="outline">Outline</Button>33<Button variant="secondary">Secondary</Button>34<Button variant="ghost">Ghost</Button>35<Button variant="link">Link</Button>3637// Available sizes38<Button size="sm">Small</Button>39<Button size="default">Default</Button>40<Button size="lg">Large</Button>41<Button size="icon">Icon Only</Button>42```4344## Form Components4546- Use `Input` for text inputs with proper labels47- Use `Select` for dropdown selections48- Use `Checkbox` for boolean selections49- Always pair form controls with `Label` components50- Use `Textarea` for multi-line text input5152## Layout Components5354- Use `Card` for content containers55- Use `Separator` for visual divisions56- Use `ScrollArea` for scrollable content57- Use `Tabs` for tabbed interfaces5859## Responsive Design6061- Design for mobile first (320px+)62- Use Tailwind responsive prefixes (sm:, md:, lg:, xl:)63- Ensure touch-friendly button sizes (min 44px)64- Test on various screen sizes6566## Theme Consistency6768- Use project color scheme (purple ping gradient primary, consistent grays)69- Maintain consistent spacing scale70- Use consistent typography hierarchy71- Follow existing component patterns7273## Custom Components7475- Extend existing UI components when possible76- Create new components in `src/components/ui/` if needed77- Follow the same naming and structure patterns78- Use `cn()` utility for conditional classes7980## Example Usage8182```typescript83import { Button } from "@/components/ui/button";84import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";85import { Input } from "@/components/ui/input";86import { Label } from "@/components/ui/label";8788// Good: Proper component composition89<Card>90 <CardHeader>91 <CardTitle>Product Details</CardTitle>92 </CardHeader>93 <CardContent>94 <div className="space-y-4">95 <div>96 <Label htmlFor="name">Product Name</Label>97 <Input id="name" placeholder="Enter product name" />98 </div>99 <Button type="submit">Save Product</Button>100 </div>101 </CardContent>102</Card>;103```104105description:106globs:107alwaysApply: false108109---110
Also in KAMAL20201/SneakerMarketplace
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| KAMAL20201/SneakerMarketplace.cursor/rules/api-patterns.mdc · 0 | Cursor rules | styletypessecuritydatabase+1 | 58/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplace.cursor/rules/development-workflow.mdc · 0 | Cursor rules | buildteststyletypes+4 | 81/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplace.cursor/rules/project-conventions.mdc · 0 | Cursor rules | buildteststylearch+4 | 77/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplace.cursor/rules/project-overview.mdc · 0 | Cursor rules | stylearchtypes | 52/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplace.cursor/rules/react-patterns.mdc · 0 | Cursor rules | stylearchuiperformance | 58/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplace.cursor/rules/typescript-standards.mdc · 0 | Cursor rules | styletypesapiui+1 | 61/100 | 3 days ago | |
| KAMAL20201/SneakerMarketplaceAGENTS.md · 0 | AGENTS.md | stylesecuritydo-not | 45/100 | 3 days ago |
Diff against .cursor/rules/api-patterns.mdc Diff against .cursor/rules/development-workflow.mdc Diff against .cursor/rules/project-conventions.mdc Diff against .cursor/rules/project-overview.mdc Diff against .cursor/rules/react-patterns.mdc Diff against .cursor/rules/typescript-standards.mdc Diff against AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
