shadcn · SHAD0001

Avoid restyling design-system components

Keep component-owned visual styles inside the component contract.
SHAD0001vite-doctor/shadcnuiwarnSuggestion

Run this rule

pnpm vite-doctor . --extends shadcn/strict --rules shadcn/no-restyle

Why it matters

Appearance classes at a component call site can override the variants and sizes owned by the design system. The Rule checks recognized components against the configured class policy.

Use the component's variants or sizes. Allow layout classes explicitly when the project's component policy permits them.

Example

Use a component variant for appearance

Before

import { Button } from "@/components/ui/button"

<Button className="bg-pink-500">Delete account</Button>

After

import { Button } from "@/components/ui/button"

<Button variant="destructive">Delete account</Button>
Copyright © 2026