# ContextBar

What the current request includes, with removable items.

- **Use it for**: What the current request includes, with removable items.
- **Not for**: A full inspection of included and excluded context. Try [ContextInspector](https://unseenui.com/components/context-inspector/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { ContextBar } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<ContextBar variant="list" items={context} usage={usage} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` |  |
| `items` (required) | `ContextItem[]` |  |
| `onRemove` | `((id: string) => void)` |  |
| `usage` | `ContextUsage` |  |
| `variant` | `"list" \| "compact" \| "chips"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[RunBoard](https://unseenui.com/components/run-board/), [AgentLanes](https://unseenui.com/components/agent-lanes/), [SubagentTree](https://unseenui.com/components/subagent-tree/), [ExecutionTimeline](https://unseenui.com/components/execution-timeline/), [WorkflowGraph](https://unseenui.com/components/workflow-graph/), [AttentionQueue](https://unseenui.com/components/attention-queue/), [RunCompare](https://unseenui.com/components/run-compare/), [Plan](https://unseenui.com/components/plan/), [AgentSteering](https://unseenui.com/components/agent-steering/), [CostLedger](https://unseenui.com/components/cost-ledger/), [ContextWindowMeter](https://unseenui.com/components/context-window-meter/), [MemoryPanel](https://unseenui.com/components/memory-panel/)

Page: https://unseenui.com/components/context-bar/
