Design system · DS0001

Avoid restyling design-system components

Keep component-owned visual styles inside the component contract.
DS0001vite-doctor/design-systemuiwarnSuggestion

Run this rule

pnpm vite-doctor . --extends design-system/strict --rules design-system/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