The issue a line of text became, at the end of its row: a status ring, the id and the title in a small chip. While a line has no issue yet, the chip is a Create issue action that waits until the row is hovered or focused.
On this page
- Action items
- To-do rows
- Comment references
- Table cells
Examples
Every status
Installation
npx knowns-ui@latest add issue-chipPaste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install Issue Chip from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/issue-chip
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add issue-chip
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/kbd.tsx
- components/ui/knowns/issue-chip.tsx
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/issue-chip, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "issue-chip" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- issue
{ id, title?, status?, statusLabel?, icon?, assignee? }|null- The issue. Null or left out shows the Create action (or nothing without onCreate).
- onOpen / href
(e) => void / string- Opens the issue. With href the chip is a link.
- showTitle
boolean- Default
true - The title after the id, cut with an ellipsis.
- showAssignee
boolean- Default
false - The assignee's name after the title. It is read out either way.
- onCreate
() => void- Creates an issue from the row while it has none.
- createLabel
string- Default
"Create issue" - The Create action's words.
- shortcut
string- A key hint in the Create action, such as "⌘ Enter", split on spaces into keys.
- active
boolean- The row has the caret or the pointer: the Create action shows. Without it, a hover or focus on the parent or a data-issue-row ancestor shows it.
- size
"sm"|"md"- Default
"md" - 20 or 24px high.
- IssueStatusGlyph
{ status, label? }- The status ring alone, decorative unless it has a label.
| Prop | Type | Default | Description |
|---|---|---|---|
| issue | { id, title?, status?, statusLabel?, icon?, assignee? } | null | - | The issue. Null or left out shows the Create action (or nothing without onCreate). |
| onOpen / href | (e) => void / string | - | Opens the issue. With href the chip is a link. |
| showTitle | boolean | true | The title after the id, cut with an ellipsis. |
| showAssignee | boolean | false | The assignee's name after the title. It is read out either way. |
| onCreate | () => void | - | Creates an issue from the row while it has none. |
| createLabel | string | "Create issue" | The Create action's words. |
| shortcut | string | - | A key hint in the Create action, such as "⌘ Enter", split on spaces into keys. |
| active | boolean | - | The row has the caret or the pointer: the Create action shows. Without it, a hover or focus on the parent or a data-issue-row ancestor shows it. |
| size | "sm" | "md" | "md" | 20 or 24px high. |
| IssueStatusGlyph | { status, label? } | - | The status ring alone, decorative unless it has a label. |
Accessibility
- The chip is a button or a link named "id, title, status, assignee"; the status ring is decorative, so it is not read twice.
- The Create action is a real button in the tab order even while it is faded out, and shows when it gets focus. On touch screens it is always shown.
- Status is told by the word in the name and the ring's shape, not by colour alone.
What it handles
- 01Shows an issue as a small chip: a status ring, the id and the title, cut with an ellipsis to fit its row.
- 02Opens the issue on click, or is a link with href; the whole chip is named with id, title, status and assignee.
- 03Without an issue it is a Create issue action that stays hidden until its row is hovered or focused, or the row has the caret.
- 04Shows a key hint such as Cmd Enter in the Create action, hidden on phones.
- 05Never takes the caret inside a rich editor: it is not editable and belongs after the row's text.
States
- First render
- Nothing moves
- none
- Row hovered or focused
- The Create action fades in
- 120ms, ease out
- Hover on the chip
- The fill darkens a step
- 120ms, ease out
- Touch screen
- The Create action is always shown
- none
- Reduced motion
- It appears at once
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing moves | none |
| Row hovered or focused | The Create action fades in | 120ms, ease out |
| Hover on the chip | The fill darkens a step | 120ms, ease out |
| Touch screen | The Create action is always shown | none |
| Reduced motion | It appears at once | 0ms |
Works with
When to use
When to use
- The issue a line became, at the end of a to-do row or an action item, with a Create action while it has none.
- A compact reference to an issue in a comment, a list or a table cell.
When not to use
- A state without an id: use Status Dot.
- A removable label: use Tag.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Issue Chip to my app and wire it to my own data.
- I need the issue a line became, at the end of a to-do row or an action item, with a Create action while it has none. Set that up with the Knowns UI Issue Chip.
- Which Issue Chip props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "issue-chip" }) and search_docs({ query: "issue chip" }).