mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## Problem `Select` does not show its invalid state correctly. Change anything in [the production form example](https://supabase.com/design-system/docs/ui-patterns/forms) and submit; <img width="982" height="401" alt="image" src="https://github.com/user-attachments/assets/3b0382e2-b77a-4f79-a9c6-3fa2d7c671a3" /> ## Solution Apply the same styles as for the other inputs: <img width="887" height="354" alt="image" src="https://github.com/user-attachments/assets/d05e12e1-171e-4e5c-8b49-2ea54ab79ce3" /> ## Review instructions Change anything in [the staging form example](https://design-system-ah0n5wasc-supabase.vercel.app/design-system/docs/ui-patterns/forms) and submit <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Select triggers now display destructive error styling when marked as invalid, including updated background and border colors. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
packages/ui
Supabase's shared React component library. Built on Radix UI primitives and shadcn/ui, styled with Tailwind CSS, and used across all Supabase apps.
Usage
Import from the 'ui' package alias:
import { Badge, Button, Input } from 'ui'
Some of the components have the _Shadcn_ suffix. These components should be preferred, they're in a process of replacing the other ones.
Utilities
// deep object merge (used for themes)
import { clipboard, cn, mergeDeep } from 'ui' // Tailwind class merging (shadcn-ui/cn)
// copy-to-clipboard helper
Styling conventions
- Tailwind only — no inline styles or CSS modules.
- Prefer shadcn semantic pairs (
bg-card text-card-foreground,bg-muted text-muted-foreground,bg-tertiary text-tertiary-foreground) over hardcoded colors. Legacy utilities such astext-foreground-lightandborder-defaultare compatibility aliases only. - Control surface roles (
bg-field,bg-control-raised,border-control-hover; CSS--controlaliases raised) live inbuild/css/source/semantic.css. Prefer those over inventing fills. Legacybg-controlis still the accent wash alias. - Themes set the core
--hue(or the split--surface-hue/--primary-hue),--chroma,--surface,--foreground-lightness, and--contrastinputs, plus their--muted-foreground-leveland--tertiary-foreground-levelhierarchy. Semantic colors are derived from them in OKLCH;--contrast: 1is the baseline and the supported adjustment range is0.75to1.25. - The workspace root owns the actual
tailwind.config.js. The file in this package is a stub for IntelliSense only.