gloryui-react
v1.1.2
Published
a react components library
Readme
gloryui-react
A modern React components library built with TypeScript, Tailwind CSS, and shadcn/ui patterns.
🚀 Getting Started
Installation
npm install gloryui-reactDevelopment
This project uses a two-terminal workflow for development:
Terminal 1 - Build Watch Mode:
npm run devThis runs tsup --watch which:
- Watches for file changes in
src/ - Automatically rebuilds the library
- Outputs to
dist/directory - Does NOT open a URL (it's just a build tool)
Terminal 2 - Storybook (Component Development):
npm run storybookThis starts the Storybook dev server:
- Opens at http://localhost:6006
- Provides visual component development environment
- Hot reloads when you make changes
- Interactive component playground
Build
npm run buildBuilds the library for production:
- Generates CJS and ESM formats
- Outputs TypeScript declarations
- Processes Tailwind CSS
- Minifies code
Other Scripts
npm test # Run tests with Jest
npm run build-storybook # Build static Storybook site🛠️ Tech Stack
- Build Tool: tsup (modern, fast TypeScript bundler)
- Styling: Tailwind CSS with shadcn/ui design system
- UI Primitives: Headless UI, Radix UI
- Component Development: Storybook
- Testing: Jest + React Testing Library
📦 Components
DrButton
A flexible button component with multiple variants and sizes.
import { DrButton } from 'gloryui-react';
<DrButton label="Click me" variant="default" size="md" />;Props:
label(string, required) - Button textvariant('default' | 'outline' | 'ghost') - Button style variantsize('sm' | 'md' | 'lg') - Button sizeclassName(string, optional) - Additional CSS classes
DrAspectRatio
Display a DOM element with fixed aspect ratios: 1:1, 4:3, or 16:9.
import { DrAspectRatio } from 'gloryui-react';
<DrAspectRatio ratio="16:9">
<img src="image.jpg" alt="Example" />
</DrAspectRatio>;Props:
ratio('1:1' | '4:3' | '16:9', required) - Aspect ratiocontainerClass(string, optional) - Additional CSS classes for containerchildren(ReactNode, required) - Content to display
