Skip to content
Goal: Proficient✓ Sources verified 2026-11-24Tailwind v4shadcn/uiInteraction Design

Tailwind CSS v4 and shadcn/ui: Building a Decent Admin UI on Your Own ​

Without a designer, you have to handle interaction design yourself, and mature components plus a design system are what let you build a professional interface quickly.

Core concepts ​

  • Tailwind CSS: utility-first CSS where styles are composed from class names. The biggest change in v4 (released 2025-01) is that configuration moved from JS to CSS: @import "tailwindcss"; in your CSS and define design tokens (colors, fonts, spacing) with @theme { ... }. You usually no longer need tailwind.config.js.
  • shadcn/ui: not an npm component library; it copies component source code into your project (npx shadcn@latest add button), built on unstyled accessible primitives such as Radix UI + Tailwind. You own the code and can change it freely.
  • Design tokens: shadcn defines themes with CSS variables (--background, --primary, etc.), so switching to dark mode is just switching variables.

How it works: why this combination suits "designing on your own" ​

  1. Accessibility and interaction details (keyboard navigation, focus management, ARIA) are handled by underlying primitives such as Radix.
  2. Consistency comes from tokens: use only preset spacing, radii and colors and the UI is naturally coherent.
  3. The source is yours: you're never boxed in by a component library's API.

In practice ​

Theme configuration in v4 ​

css
/* app/globals.css */
@import "tailwindcss";

@theme {
  --color-brand: oklch(0.55 0.22 290);
  --font-sans: "Inter", "PingFang SC", sans-serif;
}

After that you can use class names such as bg-brand and text-brand directly.

Common component combinations for a review console ​

Screenshadcn components
Task listData Table (built on TanStack Table), Badge (status), Pagination
Task detailsTabs, Card, Separator, Skeleton (loading state)
Human reviewForm + Input + Select, Dialog (confirmation), Sonner (toasts)
Side-by-side source viewResizable (split panes), ScrollArea

Interaction design checklist (when there's no designer) ​

  • Every page has an empty state, loading state, error state and no-permission state
  • Destructive actions ask for confirmation; long actions show progress and can be cancelled
  • Forms: field-level error messages, the button disabled while submitting, clear feedback on success
  • Keyboard friendly: sensible Tab order, Esc closes dialogs

Common pitfalls ​

  1. Configuring v4 from a v3 tutorial: the tailwind.config.js approach is no longer the default in v4.
  2. Styles lost through class name concatenation: Tailwind scans source code for complete class names, so dynamically built names like bg-${color}-500 are never generated.
  3. Editing shadcn components directly and then being unable to upgrade: by design you own the source, so upgrades mean merging by hand. Accept that trade-off up front.

Common interview questions ​

  1. What are the main differences between Tailwind v4 and v3?
  2. What's the fundamental difference between shadcn/ui and component libraries such as MUI / Ant Design?
  3. Without a designer, how do you make sure the UI is consistent and easy to use?
  4. Why do dynamically concatenated Tailwind class names stop working?

Sources ​

Vin Amory · AI development × content creation · Technical notes cite official docs in each page’s sources section