button-widget
v1.0.2
Published
A simple button widget component for React applications
Downloads
17
Maintainers
Readme
Button Widget
A simple, customizable button component for React applications.
Installation
npm install button-widgetUsage
import ButtonWidget from 'button-widget';
import 'button-widget/dist/button-widget.css';
function App() {
return (
<div>
<ButtonWidget
text="Click me!"
variant="primary"
handleClick={() => console.log('Button clicked!')}
/>
</div>
);
}Props
| Prop | Type | Default | Description | |------|------|---------|-------------| | text | string | "Click me" | Button text | | variant | string | "primary" | Button variant ("primary" or "secondary") | | handleClick | function | undefined | Click handler function |
Features
- Customizable button text and styling variants
- Click counter functionality
- Responsive design
- Accessible focus states
- Smooth hover and active animations
Development
To run the demo locally:
npm run devTo build the package:
npm run buildLicense
MIT
