

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# Guidelines for Styling78## Purpose and Overview9These styling guidelines ensure consistency, readability, and maintainability across the project's components. By following these conventions, we maintain a clean and organized codebase that's easier to understand and modify.1011## Tailwind CSS Usage1213### Class Organization14When using the `cn()` utility function to combine Tailwind classes, group related classes on separate lines by their purpose:1516NOTE: Only group the classes if there's a psuedo classes involve1718```tsx19className={cn(20 // Layout and dimensions21 'box-border h-[44px] w-full md:w-full',22 // Borders and corners23 'rounded-2xl border border-base-400',24 // Spacing and padding25 'px-3 md:px-4',26 // Typography and colors27 'placeholder:text-base-400',28 // States (focus, hover, active)29 'focus:border-[2px] focus:border-primary-focus focus:outline-none focus:ring-0',30 // Conditional states (disabled, checked, etc.)31 'disabled:border-base-400 disabled:bg-white disabled:text-base-400',32 // External classes passed as props33 className34)}35```3637### Grouping Principles38Group Tailwind classes by these categories:391. **Layout & Sizing**: `flex`, `grid`, `w-`, `h-`, `max-w-`, etc.402. **Positioning**: `relative`, `absolute`, `inset-`, etc.413. **Borders & Corners**: `border-`, `rounded-`, etc.424. **Spacing**: `p-`, `m-`, `gap-`, etc.435. **Typography**: `text-`, `font-`, etc.446. **Colors & Backgrounds**: `bg-`, `text-color`, etc.457. **State Variants**: `hover:`, `focus:`, `active:`, etc.468. **Conditional Variants**: `disabled:`, `dark:`, etc.479. **External Classes**: Always include the `className` prop last4849## Responsive Design Approach5051### Mobile-First Design52Follow a mobile-first approach with responsive breakpoints:5354```tsx55className={cn(56 // Mobile (default)57 'w-full p-2 text-sm',58 // Medium screens (md)59 'md:w-auto md:p-4 md:text-base',60 // Large screens (lg)61 'lg:p-6 lg:text-lg'62)}63```6465### Media Query Grouping66Group responsive classes by breakpoint rather than by property type for complex components. This improves readability by making it easy to see all styles that apply at each breakpoint:6768```tsx69className={cn(70 // Base styles (mobile)71 'flex flex-col w-full p-4 text-sm rounded-md bg-white',72 // Small screens (sm)73 'sm:flex-row sm:gap-4 sm:p-5 sm:text-base',74 // Medium screens (md)75 'md:gap-6 md:p-6 md:rounded-lg',76 // Large screens (lg)77 'lg:max-w-5xl lg:p-8 lg:gap-8',78 // Larger screens (lg)79 'xl:max-w-full xl:p-10 xl:gap-8',80 // External classes81 className82)}83```8485## Implementation Examples8687### Button Component Example88```tsx89<button90 className={cn(91 // Base styles92 'inline-flex items-center justify-center',93 'h-10 px-4 py-2',94 'rounded-md text-sm font-medium',95 'transition-colors focus-visible:outline-none focus-visible:ring-2',96 // Variant styles97 variant === 'default' && 'bg-primary text-white hover:bg-primary-focus',98 variant === 'outline' && 'border border-base-400 hover:bg-base-100',99 // Size styles100 size === 'sm' && 'h-8 px-3 text-xs',101 size === 'lg' && 'h-12 px-6 text-base',102 // Responsive styles103 'w-full sm:w-auto',104 'text-sm md:text-base',105 // Disabled state106 disabled && 'opacity-50 cursor-not-allowed',107 // External classes108 className109 )}110>111 {children}112</button>113```114115### Card Component Example116```tsx117<div118 className={cn(119 // Base layout and spacing120 'w-full p-4',121 // Responsive layout122 'md:p-6 lg:p-8',123 'sm:flex sm:gap-4 md:gap-6',124 // Borders and shadows125 'rounded-lg border border-base-200 shadow-sm',126 // Background and text colors127 'bg-white text-base-900',128 // Hover state129 'hover:shadow-md transition-shadow duration-200',130 // External classes131 className132 )}133>134 {children}135</div>136```
One 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 |
|---|---|---|---|---|---|
| constROD/template-react-vite.cursor/rules/data-access-via-api.mdc · 15 | Cursor rules | teststylearchtypes+1 | 74/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/design-system.mdc · 15 | Cursor rules | lint-formatstylearchui | 58/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/mutation-hooks.mdc · 15 | Cursor rules | stylearchtypes | 70/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/project-structure.mdc · 15 | Cursor rules | stylearchdependencies | 78/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/query-hooks.mdc · 15 | Cursor rules | stylearchtypesperformance | 70/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/service-layer.mdc · 15 | Cursor rules | stylearchtypes | 66/100 | 14 days ago | |
| constROD/template-react-vite.cursor/rules/zustand-store.mdc · 15 | Cursor rules | teststylearchtypes+1 | 74/100 | 14 days ago | |
| constROD/template-react-viteAGENTS.md · 15 | AGENTS.md | testlint-formatstylearch+3 | 90/100 | 14 days ago | |
| constROD/template-react-viteCLAUDE.md · 15 | CLAUDE.md | testlint-formatstylearch+3 | 90/100 | 14 days ago |
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 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/constrod-template-react-vite-cursor-rules-styling)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.