RCR Frontend
Supplements global react-guidelines and frontend-html-css-guidelines skills.
Component Organization
- •Reusable components:
src/app/components/with kebab-case naming (includes all Shadcn-derived primitives) - •No separate
ui/directory — everything lives directly undersrc/app/components/ - •Page-specific components:
-components/directory or-component.tsxsuffix
Styling
- •Tailwind CSS v4 with
c-*design tokens fromsrc/app/styles/theme.css - •Semantic color pattern:
c-main/c-main-contrast,c-destructive/c-destructive-contrast. Never invent token names — checksrc/app/styles/app.cssfor the full list - •Never use legacy Shadcn theme variables (
bg-background,text-foreground, etc.) - •Detecting invalid classes: Oxfmt sorts unknown classes to the front. If classes appear out of order after
bun check, they're misspelled or missing from the theme
Radix & Shadcn
- •Always import Radix from the
radix-uipackage (import { HoverCard as HoverCardPrimitive } from 'radix-ui'), not from subpackages like@radix-ui/react-hover-card - •Use
asChildto compose styling (e.g., dropdown trigger styled as Button) rather than duplicating inline styles - •Mark key DOM nodes with
data-slotattributes for styling hooks
Icons & Loading
- •Lucide icons with
Iconsuffix:HomeIcon, notHome - •Use
<Spinner />from@/components/spinnerfor loading states
Forms
- •TanStack Forms + Zod schemas for form management and validation