ShtukbaseStandard

shadcn/ui

shadcn · version 0.1.1
Design4 norms4 checks

The shadcn/ui approach: 29 components on Radix and Tailwind are placed in the project and belong to it, a theme on CSS variables in a light and a dark scheme, cn(), components.json. Norms: components in one folder, colors only from the theme, a complete theme, a valid config.

About the package

The shadcn/ui approach for a project on React and Tailwind 4: component sources live in the project and belong to it, and the look is held by a theme of CSS variables. What this approach is in our own words, what is placed and how to add a component is on the page shadcn/ui.

What it installs

  • The page shadcn/ui: a guide, the list of the project's components (components:), where @/ points (aliasRoot:).
  • A theme showcase: buttons, fields, a card, tabs, badges, alerts in the light and dark schemes, and the contrast of color pairs.
  • The place action (runs by itself after install and update): components go to the ui folder from components.json, cn() to utils, the theme to tailwind.css, and components.json if there is none; hashes go to .shadcn.json. It does not overwrite edited files.
  • The registry: 29 shadcn/ui components (style new-york-v4), cn(), the "neutral" theme for Tailwind 4, and the default components.json, in .shtukbase/packages/shadcn/registry/ with the MIT license and a note of the source.
  • Norms:
    • SHD-R01: components.json is valid; the config check.
    • SHD-R02: components in one folder, Radix primitives only there; the folder check.
    • SHD-R03: colors only from the theme: no Tailwind palette and no custom colors in components; the colors check.
    • SHD-R04: the theme has a light and a dark scheme and all required variables; the theme check.

Where the boundary is

  • The package does not install npm dependencies and does not build code: the needed packages (react, radix-ui, cva, cn, lucide-react, tailwindcss 4, tw-animate-css) are printed by place as a list.
  • The registry has 29 components; blocks, charts, a calendar and a sidebar are not included. The rest is added with the ordinary shadcn CLI; they share components.json.
  • Theme contrast is a norm of the design-a11y package, spacing and font scales belong to design-scales.
  • tools/vendor.ts is for whoever maintains the package: it re-reads the components from the open shadcn registry. Installation does not run it.

Source: shadcn/ui, https://ui.shadcn.com, MIT © 2023 shadcn; read on 28.11.2026.

Norms 4

IDNormLevelModeEnforcer
SHD-R01
components.json in the project root is a JSON object with the fields that shadcn reads, of the right types; the theme file from tailwind.css exists; the ui and utils aliases lead to a folder and a file.
MUST blocks
check
SHD-R02
Interface components live in one folder, the ui alias from components.json: all placed components are present; outside it, files declare no components (data-slot) and import no Radix primitives.
MUST blocks
check
SHD-R03
In the product's components and screens a color is taken only from theme variables: no Tailwind palette colors (bg-red-500), no custom colors (bg-[#fff], style={{ color: "#333" }}, fill="#000") and no raw colors in CSS rules.
MUST blocks
check
SHD-R04
The theme in the project's CSS sets --radius and all required shadcn colors in :root, and the dark scheme (.dark) sets all the required colors again; every color is a color.
MUST blocks
check

"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.

Actions 5

NameWhat it doesFileWhen
placePlace components in the project (the list is on /design/shadcn.md; names in the arguments add more; --force replaces edited ones)actions/place.ts
after install after update
configcomponents.json is valid
norm SHD-R01
checks/config.ts
check
folderComponents in one folder, Radix only there
norm SHD-R02
checks/folder.ts
check
colorsColors only from the theme
norm SHD-R03
checks/colors.ts
check
themeThe theme has both schemes and all required variables
norm SHD-R04
checks/theme.ts
check

shtuk check runs the checks; shtuk run shadcn <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.

Pages 6

They go into the project at these paths.

Package files 43

They go into .shtukbase/packages/shadcn/; actions run from there.