@postbee/postbee-ui-lib
v1.32.3
Published
<div align="center"> <img src="public/images/PostBee-Logo.png" alt="PostBee Logo" width="420"> <h1>PostBee UI Library πΌ</h1> <p><a href="https://www.npmjs.com/package/@postbee/postbee-ui-lib"><img alt="npm version" src="https://img.shields.io/npm/v
Readme
A modern, accessible React component library powered by Tailwind CSS 4, Radix Primitives, and TypeScript. Batteries included: theming, icons, tests, and Storybook docs.
β¨ Features
- π Type-safe: Written in TypeScript with ESM and CJS builds
- βΏ Accessible primitives: Built on Radix UI
- π¨ Theming: Tailwind CSS 4 tokens and ready-to-use styles
- β Well-tested: Vitest + Testing Library
- π Storybook: Local docs for components and tokens
π¦ Installation
npm install @postbee/postbee-ui-libπ Quick Start
- Import the base styles once in your app entry:
// e.g., src/main.tsx or _app.tsx
import '@postbee/postbee-ui-lib/styles';- Use components:
import { Button, Icon, Paragraph } from '@postbee/postbee-ui-lib';
export default function Example() {
return (
<div>
<Paragraph>Welcome to PostBee UI</Paragraph>
<Button>Click me</Button>
<Icon name="checkmark" />
</div>
);
}π¨ Tailwind Configuration (optional)
You can extend your Tailwind setup with our exported configuration and design tokens.
// tailwind.config.ts
import baseConfig from '@postbee/postbee-ui-lib/tailwind.config.ts';
export default {
// your app config ...
presets: [baseConfig],
};π§© Available Components
- π€ Avatar
- π Buttons: Button, IconButton, TextButton, ToggleButton, LikeButton, CommentsButton, CopyButton
- π¬ Dialog
- π Fields: Input, Textarea, ErrorMessage
- π― Icon (with built-in SVG set)
- π Link
- π·οΈ Logo
- π Tabs
- βοΈ Typography: Heading, Label, Paragraph
Import from the package root:
import {
Avatar,
Button,
CommentsButton,
CopyButton,
Dialog,
ErrorMessage,
Heading,
Icon,
IconButton,
Input,
Label,
LikeButton,
Link,
Logo,
Paragraph,
Tabs,
TextButton,
Textarea,
ToggleButton,
} from '@postbee/postbee-ui-lib';π οΈ Scripts
- π dev: Vite playground for local development
- π storybook: Run Storybook locally on port 6006
- π¦ build: Create ESM/CJS builds and copy styles/config
- π§ͺ test: Run unit tests (Vitest)
- π lint: Lint, type-check, and unused check
npm run dev
npm run storybook
npm run build
npm test
npm run lintπ Peer Dependencies
- βοΈ React: 19
- π React DOM: 19
- π¨ Tailwind CSS: 4
π» Tech Stack
- βοΈ Framework: React 19 + TypeScript
- π¨ Styling: Tailwind CSS 4, Design Tokens
- βΏ A11y Primitives: Radix UI (Avatar, Dialog, Tabs)
- β‘ Build: Vite 7
- π Docs: Storybook 10
- π§ͺ Testing: Vitest, @testing-library/react, jsdom
- π Lint/Format: ESLint, Prettier
- π Release: semantic-release
π Local Storybook Docs
Run Storybook to explore components and tokens:
npm run storybookπ Storybook URL
- π Local:
http://localhost:6006(after runningnpm run storybook) - π Hosted (Vercel): https://postbee-ui-lib.vercel.app
π€ Contributing
- πΏ Create a feature branch
- π¨ Build and test locally
- β¨ Add stories and tests for new components
- π€ Submit a PR
π References
- βοΈ React:
https://react.dev - π¨ Tailwind CSS v4:
https://tailwindcss.com - βΏ Radix UI:
https://www.radix-ui.com/primitives - π Storybook:
https://storybook.js.org - π§ͺ Testing Library:
https://testing-library.com/docs/react-testing-library/intro - β‘ Vitest:
https://vitest.dev - π semantic-release:
https://semantic-release.gitbook.io/semantic-release
π₯ Contributors
Made with β€οΈ by PostBee Team. All trademarks are property of their respective owners.
- π¨βπ» @ricardo17coelho
- π¨βπ» @vco-80
