@piyushnagar/react-ui-components
v0.1.1
Published
A modern React component library with Storybook documentation.
Readme
React UI Components Library
A modern React component library with Storybook documentation.
Installation
npm install @yourusername/react-ui-componentsUsage
import { Button } from '@yourusername/react-ui-components';
function App() {
return (
<Button variant="primary">
Click me
</Button>
);
}Development
- Clone the repository
- Install dependencies:
npm install - Start Storybook:
npm run storybook - Build the library:
npm run build
Publishing to NPM
- Create an NPM account if you don't have one
- Login to NPM:
npm login - Update the package name in
package.jsonto your desired scoped name (e.g.,@yourusername/react-ui-components) - Update the version number in
package.json - Build the library:
npm run build - Publish to NPM:
npm publish --access public
Using in Another Project
Install the package:
npm install @yourusername/react-ui-componentsImport and use components:
import { Button } from '@yourusername/react-ui-components'; function App() { return ( <Button variant="primary"> Click me </Button> ); }
Available Components
- Button
- Variants: default, destructive, outline, secondary, ghost, link
- Sizes: default, sm, lg, icon
More components coming soon!
