A customizable button component built on top of Ant Design with additional variants and styling.
npm install s1-ui-componentA customizable button component built on top of Ant Design with additional variants and styling.
``bash`
npm install vinh-button-antd antdor
pnpm add vinh-button-antd antdor
yarn add vinh-button-antd antd
`tsx
import { VinhButtonAntd } from 'vinh-button-antd';
function App() {
return (
Props
The component extends all Ant Design Button props and adds:
| Prop | Type | Default | Description |
|------|------|---------|-------------|
|
variant | 'primary' \| 'secondary' \| 'danger' | 'primary' | Button variant style |
| size | 'small' \| 'middle' \| 'large' | 'middle' | Button size |Features
- 🎨 Three distinct variants (primary, secondary, danger)
- 📏 Three size options (small, middle, large)
- ♿ Full accessibility support from Ant Design
- 🎭 Custom hover and focus animations
- 📦 TypeScript support
- 🔧 Extends all Ant Design Button functionality
Development
Run
nx test vinh-button-antd to execute the unit tests via Vitest.Run
nx build vinh-button-antd to build the library.Run
nx storybook vinh-button-antd` to view component stories.MIT