@labring/sealos-ui
v1.0.1
Published
Shared shadcn-based UI components for Sealos frontend apps.
Keywords
Readme
@labring/sealos-ui
Shared shadcn-based UI components for Sealos frontend apps.
Getting started (Next.js / React apps)
1) Install dependencies
# package + peer deps
pnpm add @labring/sealos-ui react-hook-form sonner
# Tailwind v4 + PostCSS
pnpm add -D tailwindcss @tailwindcss/postcss postcssFor workspace usage, you can also add this in package.json:
{
"dependencies": {
"@labring/sealos-ui": "workspace:^"
}
}2) Add PostCSS config
// postcss.config.mjs
export default {
plugins: {
'@tailwindcss/postcss': {}
}
};3) Import styles in your app entry stylesheet
Import in your root stylesheet (for example global.css):
/* Tailwind CSS + theme tokens + base shared styles + shared component @source */
@import '@labring/sealos-ui/shadcn.css';Usage
import { Button, cn } from '@labring/sealos-ui';Subpath import is also supported:
import { Button } from '@labring/sealos-ui/button';Developing this package
pnpm typecheckLocal Showcase App
The repository now includes a private showcase app generated with shadcn create at apps/showcase.
It is for local UI preview only and is not published to npm.
pnpm install
pnpm showcase:devBuild preview app:
pnpm showcase:buildAdding component/hook with shadcn CLI
See: shadcn/ui docs
