Branch Chip

The git-shaped identity chip every agent workbench renders next to a session: branch name in mono, optional ahead/behind counts and PR state. Pressing it copies the name — the one thing you always do with a branch.

tsx
import { BranchChip } from "@/registry/seam/ui/branch-chip"

// Press to copy — the icon crossfades to a check.
export default function BranchChipDemo() {
  return <BranchChip branch="claude/fix-auth-redirect" />
}
bunx --bun @seamui/cli@latest add branch-chip

Notes

  • A raised key, not an entry well — it wears Button (secondary, chip-sized), so press depth, the haptic tap, and focus handling come from the foundation. On copy the icon crossfades GitBranch → Check on an opacity fade, identical under reduced motion.
  • Set copyable={false} for a static chip inside an already-clickable row (a session item, a table cell) — it renders as a span on badgeVariants instead of a nested button.
  • Purely presentational: branch, ahead/behind, and pr come in as props; onCopy reports out. No git integration is assumed.
  • Ahead/behind is announced as “2 ahead, 1 behind” rather than as arrow glyphs; the PR segment announces number and state.

Press feedback, reduced motion, and haptics follow the global policy — see Motion and Haptics.