shadcn/ui copies component code directly into your repository, so admin interfaces can be changed at any time to meet customer requirements, without waiting for someone else's package to update.
Key takeaways
- shadcn/ui is not an install-and-use library: the CLI copies component code into your repository, and you edit it directly there
- Sidebar works out of the box; Data Table must be assembled yourself based on TanStack Table, following the guide
- The code is yours, and so are the patches: no automatic updates, and re-running the generation command will overwrite files
You meet the customer on Monday and need to demo an order-processing agent by Friday. The agent already runs, but the customer's operators need an interface to review its output, and there is no designer on the project.
What you need this week is a tool that lets you change any line of interface code in your own repository. A polished but closed UI library forces you to work around it with every change, and it slows you down precisely when speed matters most.
shadcn/ui takes exactly this path. Its GitHub repository describes it as composable, accessible components. The official documentation goes further: it is not a component library, but a way to build your own component library.
For a Forward Deployed Engineer (FDE), this distinction is more than wording. Every demo hits the moment when the customer wants to change a small detail. Editing files you own is far faster than figuring out how to modify a package someone else maintains.
The component code lives in your repository
The project calls this principle Open Code. The documentation puts it plainly: the top-level component code is yours to modify; if you want to change a button, open the button's code and change it. When a customer wants the status column to show a red badge for overdue orders, you don't have to override someone else's styles or wait for a reply under an issue.
Vercel Academy sums it up well: traditional component libraries create dependencies, while shadcn/ui creates ownership. Styling is based on Tailwind CSS. Tailwind 4.0 was released on January 22, 2025, and its biggest change was moving project configuration from JavaScript to CSS.
The order review demo, step by step
Back to the order review interface. Suppose you start from a Vite project using React and TypeScript. Using Tailwind v4 with Vite requires two things:
@tailwindcss/vite
the plugin, plus a single import line in the CSS file. After that, the shadcn CLI's
add
command handles adding components and their dependencies to the project.
npm install tailwindcss @tailwindcss/vite npm install -D @types/node # 让 vite.config 可以使用 path 模块 # 在 src/index.css 中,把全部内容替换为:@import "tailwindcss";
Installing the package is not enough; the plugin must be registered in
vite.config.ts
. Along the way, declare an
src
alias pointing to
@
, because component code imports are written in the form
@/components/ui/button
:
// vite.config.ts
import path from "path"
import react from "@vitejs/plugin-react"
import tailwindcss from "@tailwindcss/vite"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: { alias: { "@": path.resolve(__dirname, "./src") } },
})TypeScript also needs to know this alias. In
tsconfig.json
(and in
tsconfig.app.json
too, if the template splits the configuration), add two entries to
compilerOptions
:
"baseUrl": "."
and
"paths": { "@/*": ["./src/*"] }. Skipping this step means
init
will struggle to complete,
@/...
imports will throw errors, and it's an easy pit to fall into when rushing.
npx shadcn@latest init npx shadcn@latest add sidebar table button npm install @tanstack/react-table
Since Tailwind v4 is configured in CSS, switching to the customer's brand color means editing the CSS file, not a JavaScript file. Being able to change this quickly pays off: when customer executives see their own brand color on screen, they are more likely to treat the tool as the company's own product rather than a prototype made by outsiders.
add sidebar
gives you a navigation layout that the documentation calls composable, themeable, and customizable: menu on the left, content on the right, the familiar frame of every admin page.
The most effort goes into the orders table. shadcn/ui's Data Table is not a pre-packaged table. The documentation doesn't provide a ready-made component; instead, it offers a guide for assembling your own table on top of TanStack Table.
Assembling the table yourself actually suits customer projects well. Suppose the agent has processed 200 orders. The operators only need to filter by the "pending review" status, sort by creation date so the earliest orders come first, and click a row to see what decision the agent made.
You define only those columns, attach only one sort and one filter, and add nothing else. Below is a minimal example with all the imports; the table rendering part is filled in with the
Table
component following the guide:
// columns.tsx
import { ColumnDef } from "@tanstack/react-table"
import { Button } from "@/components/ui/button"
export type Order = { id: string; status: "needs_review" | "approved"; createdAt: string }
export const columns: ColumnDef<Order>[] = [
{ accessorKey: "id", header: "订单 ID" },
{ accessorKey: "status", header: "状态" },
{
accessorKey: "createdAt",
header: ({ column }) => (
<Button variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}>
创建时间
</Button>
),
},
]// data-table.tsx(示例:省略了渲染表格的 JSX)
import { useState } from "react"
import {
useReactTable,
getCoreRowModel,
getSortedRowModel,
getFilteredRowModel,
SortingState,
ColumnFiltersState,
} from "@tanstack/react-table"
import { columns, Order } from "./columns"
export function OrdersTable({ data }: { data: Order[] }) {
const [sorting, setSorting] = useState<SortingState>([])
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])
const table = useReactTable({
data, columns,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getFilteredRowModel: getFilteredRowModel(),
onSortingChange: setSorting,
onColumnFiltersChange: setColumnFilters,
state: { sorting, columnFilters },
})
// “待审核”按钮:table.getColumn("status")?.setFilterValue("needs_review")
// ……渲染 table.getHeaderGroups() 和 table.getRowModel().rows
}The cost of owning the code
The downside is hidden inside the advantage. Vercel Academy states the cost clearly: you lose automatic updates and automatic security patches. According to PkgPulse, updating a component requires re-running its generation command, and that command overwrites files; if you don't diff first, your changes may be lost.
You don't own everything, either. PkgPulse points out that the copied-in components still depend on Radix packages in node_modules. What you hold is the top layer; underneath, it's dependencies as usual.
Accessibility also needs attention. The components are built to accessibility standards initially, but once you modify the markup for a customer, no one is checking for you anymore. That's acceptable for the demo phase. If this interface is to become an internal tool in production, agree with the customer on who owns the interface code before delivery.
The ecosystem is still evolving. The August 2026 changelog notes that the GitHub registry now supports private repositories, so teams can keep customized internal components in one private location. Worth mentioning at delivery for customers with multiple projects.
The last limitation is the Data Table. Because you assemble it yourself, if you've never touched TanStack Table, this is where the most time goes. Learn it before signing the contract, not on Thursday night.
What to learn first, and how to write it on your resume
A sensible order is to learn Tailwind first, since the components are built on top of it, and at the same time learn to configure the plugin and alias in Vite. Then the
init
and
add
commands, and then spend most of your time on TanStack Table, the only part that needs to be truly understood rather than copied in and used.
From a career perspective, a working admin interface that a hiring manager can click through with their own hands is more persuasive than any line of listed skills. Don't write a vague "familiar with React" on your resume; instead write "built a review interface for agent output, with sorting and filtering based on real data," and include a link to the repository.
You don't need to become a designer. What's worth proving is: when the customer asks "Can you show me?", you can open an interface on the spot and show them.
Was this article helpful?
Thanks for your feedback!
10 sources
- Introduction - shadcn/ui
- shadcn - shadcn/ui
- GitHub - shadcn-ui/ui: Composable, accessible components with thoughtful defaults.
- Data Table
- Sidebar - shadcn/ui
- Changelog - shadcn/ui · 2026-08
- Tailwind CSS v4.0 - Tailwind CSS · 2025-01-22
- Installing Tailwind CSS with Vite - Tailwind CSS
- Why shadcn/ui is Different (Vercel Academy) · 2025-10-17
- shadcn/ui vs Radix UI: Component Library vs 2026 (PkgPulse Guides) · 2026-03-08