Small status indicator or count label positioned relative to its child element. Animated on appearance using Framer Motion.
Scanned 5/27/2026
Install via CLI
openskills install reaviz/skills# Badge
Small status indicator or count label positioned relative to its child element. Animated on appearance using Framer Motion.
## Import
```tsx
import { Badge } from 'reablocks';
```
## Badge Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `content` | `string \| JSX.Element` | — | Badge content (text or element) |
| `color` | `'default' \| 'primary' \| 'secondary' \| 'error' \| string` | `'default'` | Color variant |
| `placement` | `'top-start' \| 'top-end' \| 'bottom-start' \| 'bottom-end'` | `'top-end'` | Badge position relative to child |
| `hidden` | `boolean` | `false` | Hide the badge |
| `disableMargins` | `boolean` | `false` | Remove default margins |
| `theme` | `BadgeTheme` | — | Per-instance theme override |
| `className` | `string` | — | Additional CSS classes |
Also accepts all standard `HTMLSpanElement` attributes.
## Basic Usage
```tsx
<Badge content="3" color="primary">
<NotificationIcon />
</Badge>
```
## Colors
```tsx
<Badge content="1" color="default"><Icon /></Badge>
<Badge content="2" color="primary"><Icon /></Badge>
<Badge content="3" color="secondary"><Icon /></Badge>
<Badge content="4" color="error"><Icon /></Badge>
```
## Placement
```tsx
<Badge content="1" placement="top-start"><Icon /></Badge>
<Badge content="2" placement="top-end"><Icon /></Badge>
<Badge content="3" placement="bottom-start"><Icon /></Badge>
<Badge content="4" placement="bottom-end"><Icon /></Badge>
```
## Hidden Badge
```tsx
<Badge content="5" hidden>
<Icon />
</Badge>
```
## Content-Only Badge (No Children)
```tsx
<Badge content="7" color="error" />
```
## BadgeTheme Interface
```typescript
interface BadgeTheme {
base: string; // Container (relative, inline-flex)
disableMargins: string; // No margin override
badge: string; // Badge element (absolute, centered, rounded)
position: string; // Default position transform
colors: {
default: string;
primary: string;
secondary: string;
error: string;
[key: string]: string;
};
positions: {
'top-start': string;
'top-end': string;
'bottom-start': string;
'bottom-end': string;
};
}
```
No comments yet. Be the first to comment!
End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches.
Orchestrate multi-phase deep research with web search, memory retrieval, pattern matching, and synthesis into structured findings
Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory Use when: conversation memory, remember, memory persistence, long-term memory, chat history.
CodeTour `.tour`ファイルを作成 — ペルソナターゲット、ステップバイステップウォークスルー(実際のファイルとラインアンカー付き)。オンボーディングツアー、アーキテクチャウォークスルー、PRツアー、RCAツアー、構造化「これがどのように機能するかを説明」リクエストに使用。
KMPプロジェクト向けのCompose MultiplatformおよびJetpack Composeパターン — 状態管理、ナビゲーション、テーマ設定、パフォーマンス、プラットフォーム固有のUI。