Shared shadcn-based UI components for Sealos frontend apps.
# package + peer deps
pnpm add @labring/sealos-ui react-hook-form sonner
# Tailwind v3 + PostCSS
pnpm add -D tailwindcss@^3.4.19 tailwindcss-animate postcss autoprefixerFor workspace usage, you can also add this in package.json:
// postcss.config.mjs
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};// tailwind.config.ts
export default {
darkMode: 'class',
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./node_modules/@labring/sealos-ui/src/**/*.{js,ts,jsx,tsx,mdx}'
],
theme: {
extend: {
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
card: {
DEFAULT: 'var(--card)',
foreground: 'var(--card-foreground)'
},
popover: {
DEFAULT: 'var(--popover)',
foreground: 'var(--popover-foreground)'
},
primary: {
DEFAULT: 'var(--primary)',
foreground: 'var(--primary-foreground)'
},
secondary: {
DEFAULT: 'var(--secondary)',
foreground: 'var(--secondary-foreground)'
},
muted: {
DEFAULT: 'var(--muted)',
foreground: 'var(--muted-foreground)'
},
accent: {
DEFAULT: 'var(--accent)',
foreground: 'var(--accent-foreground)'
},
destructive: {
DEFAULT: 'var(--destructive)',
foreground: 'var(--destructive-foreground)'
},
border: 'var(--border)',
input: 'var(--input)',
ring: 'var(--ring)'
}
}
},
plugins: [require('tailwindcss-animate')]
};Import in your root stylesheet only if the app does not already define Sealos theme tokens:
/* Tailwind CSS + theme tokens + base shared styles */
@import '@labring/sealos-ui/shadcn.css';import { Button, cn } from '@labring/sealos-ui';Subpath import is also supported:
import { Button } from '@labring/sealos-ui/button';pnpm typecheckThe 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:buildSee: shadcn/ui docs
This repository also ships the sealos-design agent skill alongside the UI package.
Install it from the GitHub repo with the Skills CLI:
npx skills add mlhiter/sealos-ui --skill sealos-designOr install by path:
npx skills add https://github.com/mlhiter/sealos-ui/tree/main/skills/sealos-design
{ "dependencies": { "@labring/sealos-ui": "workspace:^" } }