shtukbasehub

The Shtukbase React component library

The same components as shtukbase-ui-html in React: the shadcn primitives with our classes and the Shtukbase composites; the code is placed in the project, as with shadcn, and draws with the CSS of the HTML library on the tokens of the chosen style.

Packageshtukbase-ui-reactv0.3.4151 files

The Shtukbase React component library

The React side of the Shtukbase design: the same components as shtukbase-ui-html, with the same ids, levels, states and controls, the same markup and the same classes. The look is written once, in the CSS of the HTML library; the React components only draw its classes and data attributes, and add behaviour.

As with shadcn and keer-ui: sources are copied into the project, not installed as a dependency. The place action puts them in the folder from the target: field of the page /design/shtukbase-ui-react.md (by default src/sb-ui) and runs by itself after install and update. Files the project edited are not touched by an update.

What it puts in the project:

  • /design/shtukbase-ui-react.md: what is inside, settings (target:, css:), what the project needs;
  • the library code in the target folder: primitives/, composites/, blocks/, shell/, lib/, styles/index.css; every component has a header (/*--- … ---*/, the one format of the build contract) and a <id>.states.tsx;
  • norms SBR-R01 (the library is intact), SBR-R02 (a component has a states file), SBR-R03 (the same components as the HTML library).

Components (one per id of shtukbase-ui-html): primitives button, badge, input, select, switch, slider come from shadcn (new-york-v4) with our classes added; the rest of the shadcn set (avatar, checkbox, label, progress, radio-group, separator, skeleton, textarea, tooltip, accordion, alert, breadcrumb, command, dialog, dropdown-menu, popover, table, tabs) has the shadcn names and slots and draws the markup of the HTML library (native inputs, details and plain surfaces, so the HTML side needs no script); chip, icon-plate, kicker, swatches, status-dot, the composites card, package-card, field, record-card, property-row, details-card, empty-state, tree-item, toolbar, search-field, settings-group and the blocks area, package-grid, settings-bar and peek are ours.

The parts in shell/: Sidebar and its parts, Panel, PanelSection, Collapsible, ScrollArea, Sheet and the layouts LayoutDocument, LayoutGrid, LayoutCatalog, LayoutCanvas (pan, zoom with the wheel and the keys, fit): plain elements with the classes of shtukbase-ui-html. The lens layout arranges these parts.

The package does not install dependencies (react, radix-ui, class-variance-authority, cn, lucide-react, tailwindcss 4, tw-animate-css); they are requirements for the project, and the list is on the page. The tests carry their own bundled copies (test/vendor) and need no install.

Boundary: no screens and no domain components; the look of our own composites is not repeated in Tailwind classes — it is the CSS of the HTML library. A control of the HTML library is a prop here (preset="cover").