@prithvirajsinh-jadav/ui
v0.0.11
Published
UI primitives (shadcn-style) and opinionated wrappers
Readme
@prithvirajsinh-jadav/ui
Primitives (./ui/*) and core wrappers (./core/*) for apps that use Tailwind v4 + shadcn-style tokens.
The npm scope matches your npm username so you can publish without creating an organization. To use a different scope (e.g. @silly-labs), create that org on npmjs.com first, then change the "name" in package.json.
Install
npm i @prithvirajsinh-jadav/uiPeers: react, react-dom, next (for next/link / next/image in a few components), next-themes, tailwindcss v4, tw-animate-css, shadcn (styles entry below).
Styles (no manual @source)
The package ships styles.css (Tailwind v4, token theme, and internal @source for components). You can load it in two ways (pick one pattern per app; the bundler usually dedupes the same file).
A — import any root export (adds a side effect on dist/index.js that loads styles.css):
import { Button, ThemeProvider, cn } from "@prithvirajsinh-jadav/ui"B — CSS only in your global stylesheet (no JS from the package yet):
@import "@prithvirajsinh-jadav/ui/styles.css";Next.js App Router — root layout (recommended if you do not want the root barrel in a server layout):
import "@prithvirajsinh-jadav/ui/styles.css"Place it alongside import "./globals.css" so tokens and Tailwind run before your app CSS.
You do not need per-app @source paths into this package’s src/.
styles.css defines --font-sans, --font-mono, and --font-heading on :root (system stacks). Optional: override --font-sans / --font-mono on <html> with next/font (variable: '--font-sans'), same as any Tailwind app.
Imports
Recommended: opinionated wrappers + shared helpers from the package root (single import path):
import { Button, AppCard, cn, ThemeProvider } from "@prithvirajsinh-jadav/ui"Primitives only (low-level components/ui, e.g. different Button API than core): subpath @prithvirajsinh-jadav/ui/ui/<name>.
Deep core/* subpaths still exist for bundlers that need granular chunks; prefer root imports for app code.
