You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Badge Component Usage
The `Badge` component can be customized for various use cases. It is for
both Markdown and TypeScript files, and we can modify its style by
passing props such as `backgroundColor`, `textColor`, `textSize`, and
`variant`.
### Props
- `variant` (optional): Determines the badge style. Available options
are:
- `default` (default)
- `secondary`
- `destructive`
- `outline`
- `backgroundColor` (optional): Custom background color for the badge.
Accepts any valid CSS color value.
- `textColor` (optional): Custom text color for the badge. Accepts any
valid CSS color value.
- `textSize` (optional): Controls the text size. Available options:
- `text-xs` (default)
- `text-sm`
- `text-base`
- `text-lg`
- `text-xl`
- `text-2xl`
- Additional props such as `className` or other standard HTML attributes
are also supported.
### Usage Examples
#### Default Badge
```tsx
<Badge>
Default Badge
</Badge>
```
#### Custom Colors
```tsx
<Badge backgroundColor="blue" textColor="white">
Custom Colors
</Badge>
```
#### Large Heading Badge
```tsx
<Badge textSize="text-2xl">
Large Heading Badge
</Badge>
```
#### Custom Styled Badge
```tsx
<Badge backgroundColor="green" textColor="black" textSize="text-lg">
Custom Styled Badge
</Badge>
```
#### Destructive Variant with Custom Text
```tsx
<Badge variant="destructive" textColor="yellow">
Destructive with Custom Text
</Badge>
```
#### Secondary Variant with Custom Styles
```tsx
<Badge backgroundColor="purple" textColor="white" textSize="text-base">
Secondary Variant with Custom Styles
</Badge>
```
#### Red Background with Custom Small Text
```tsx
<Badge backgroundColor="green" textColor="white" textSize="text-sm">
Red Background with Custom Small Text
</Badge>
```
0 commit comments