Task: Chip / FilterPill Component
Type: Component
Milestone: M0.5 — Shared Component Library
Estimate: S
Component Type
Props Interface
interface ChipProps {
label: string;
isSelected?: boolean;
isDisabled?: boolean;
onSelect?: () => void;
onDismiss?: () => void; // renders × button when provided
count?: number; // badge count shown inline e.g. "Escalated (1)"
className?: string;
}
// Group wrapper for mutually exclusive filter sets
interface ChipGroupProps {
options: { label: string; value: string; count?: number }[];
selected: string;
onChange: (value: string) => void;
}
Variants / States
| State |
Description |
| Default |
Unselected — tertiary border, secondary text |
| Selected |
Secondary bg, primary text, secondary border, medium weight |
| Disabled |
Opacity 50%, no pointer events |
| With count |
Count badge renders inside the pill after the label |
| Dismissible |
× button inside pill — used for active filter tags |
Acceptance Criteria
Notes
- Used in
ModerationQueue filter row (All / Escalated / Spam / Hate speech) and UserManagement role filters
ChipGroup is the right component for the queue filter row — not individual Chip instances managed manually
Task: Chip / FilterPill Component
Type: Component
Milestone: M0.5 — Shared Component Library
Estimate: S
Component Type
Props Interface
Variants / States
×button inside pill — used for active filter tagsAcceptance Criteria
ChipGroupenforces single-select — callsonChangewith new valuecountbadge renders inline without breaking pill shapeonDismissrenders×, clicking it does not also callonSelectSpace/Entertoggles selectionChipGroupinsideoverflow-x: autocontainer doesn't wrapNotes
ModerationQueuefilter row (All / Escalated / Spam / Hate speech) andUserManagementrole filtersChipGroupis the right component for the queue filter row — not individualChipinstances managed manually