unpain-recomponents
v1.0.1
Published
React components library for documentation
Maintainers
Readme
Recomponents
React components library for documentation sites, built with Vite.
Installation
npm install unpain-recomponents
# or
pnpm add unpain-recomponents
# or
yarn add unpain-recomponentsUsage
import {
CodeBlock,
CodeComponent,
DividerWithText,
DemoBox,
InfoBox,
TableOfContents
} from 'unpain-recomponents'
// Use the components in your React app
<InfoBox type='info' title='Information'>
This is an info box
</InfoBox>Components
- CodeBlock: Display syntax-highlighted code blocks
- CodeComponent: Interactive code component with demo
- DividerWithText: Text divider component
- DemoBox: Container for component demonstrations
- InfoBox: Information/warning/error boxes
- TableOfContents: Auto-generated table of contents
Development
This package is built with Vite, which provides excellent support for modern development features including import.meta.glob for dynamic imports.
# Build the package
pnpm build
# Watch mode for development
pnpm devBuild Features
- ✅ ES Modules and CommonJS output
- ✅ TypeScript declaration files
- ✅ Source maps for debugging
- ✅ Dynamic SVG icon loading with
import.meta.glob - ✅ Optimized bundle size
Dependencies
This package requires the following peer dependencies:
- React >= 18.0.0
- React DOM >= 18.0.0
- Tailwind CSS >= 3.0.0
License
ISC
