dolores-lib
v0.1.1
Published
Dolores-Lib is a React component library for Next.js apps, built with shadcn/ui, Base UI, Tailwind CSS, and Storybook.
Maintainers
Readme
Dolores-Lib
Dolores-Lib is a publishable React component library designed for Next.js consumers and documented with Storybook. It uses Vite for the package build, Storybook 10.4 for docs/testing/MCP, shadcn/ui patterns with Base UI primitives, Tailwind CSS v4, Geist typography, and Phosphor icons.
Scripts
pnpm typecheck
pnpm build
pnpm storybook
pnpm build-storybook
pnpm test:storybookConsumer Setup
Install
pnpm add dolores-libNext.js App Router
In app/layout.tsx, import the stylesheet once and ensure React 19:
import type { Metadata } from 'next'
import 'dolores-lib/styles.css'
export const metadata: Metadata = {
title: 'My App',
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}Use components anywhere in your app:
import { Button } from 'dolores-lib'
export default function Page() {
return <Button>Click me</Button>
}Toggle dark mode by applying the dark class to the document root.
Publish to npm
- Create an npm account at npmjs.com if needed.
- Log in locally:
npm login- Build and publish from this repo:
pnpm build
npm publish --access publicThe dolores-lib package name is currently available on npm. After publishing, install it in any project with pnpm add dolores-lib.
