ExecutionCount
Displays the classic Jupyter execution count indicator with bracket notation
[ ]:[*]:[1]:[42]:
A cell primitive that displays the classic Jupyter execution count indicator. Uses the familiar bracket notation: [ ]: for never executed, [*]: for currently executing, and [n]: for executed cells.
Installation
npx shadcn@latest add https://nteract-elements.vercel.app/r/execution-count.jsonCopy the component from nteract/elements.
Usage
import { ExecutionCount } from "@/registry/cell/ExecutionCount"
export function CellGutter() {
return (
<div className="flex items-center">
<ExecutionCount count={1} />
</div>
)
}States
Never Executed
When count is null and isExecuting is false, displays empty brackets.
[ ]:[ ]:
<ExecutionCount count={null} />Executing
When isExecuting is true, displays an asterisk to indicate the cell is running.
[*]:[*]:
<ExecutionCount count={null} isExecuting />Executed
When count is a number, displays the execution count.
[1]:[5]:[42]:
<ExecutionCount count={1} />
<ExecutionCount count={5} />
<ExecutionCount count={42} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | null | — | The execution count. null for never executed. |
isExecuting | boolean | false | Whether the cell is currently executing |
className | string | — | Additional CSS classes |