@boss-sh/ui
v0.2.1
Published
Shared Mantine theme and UI primitives for Boss applications.
Maintainers
Readme
@boss-sh/ui
Shared Mantine theme and UI primitives for Boss applications.
Install
npm install @boss-sh/uiPeer dependencies: @mantine/core and react.
Usage
Full setup (new app)
import { ColorSchemeScript, MantineProvider } from '@mantine/core'
import {
shadcnTheme,
shadcnCssVariableResolver,
globalStyles,
themeStyles
} from '@boss-sh/ui'
function RootDocument({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<link rel="stylesheet" href={globalStyles} />
<link rel="stylesheet" href={themeStyles} />
</head>
<body>
<ColorSchemeScript defaultColorScheme="auto" />
<MantineProvider
theme={shadcnTheme}
cssVariablesResolver={shadcnCssVariableResolver}
defaultColorScheme="auto"
>
{children}
</MantineProvider>
</body>
</html>
)
}Exports
| Export | Description |
|--------|-------------|
| shadcnTheme | Mantine theme object (colors, typography, spacing, radius, shadows, component defaults) |
| shadcnCssVariableResolver | CSS variables resolver for light/dark mode |
| globalStyles | URL to globals CSS (Mantine core styles, CSS reset, custom loader) |
| themeStyles | URL to component override CSS (form controls, buttons, modals, etc.) |
Additional Mantine addon styles
If your app uses Mantine addons, import their styles separately:
@import "@mantine/dropzone/styles.css";
@import "@mantine/notifications/styles.css";
@import "@mantine/dates/styles.css";Development
bun install
bun run build
bun run typecheckPublish
bun run build
npm publish --access publicIf you are working locally before pushing, run bun run build once before committing when you need the generated files updated immediately.
