# Time Tracker

> A start/stop timer for what you are working on, with project and billable, and today's entries with their total.

Component · CRM · Halo kit · [Live page](https://ui.twentyfirst.media/halo/components/TimeTracker/)

A start/stop timer for what you are working on, with project and billable, and today's entries
with their total.

- The clock ticks every second while `running`; pass `now` for a fixed render.
- Each control appears only when its handler is passed (`onTask`, `onProject`, `onBillable`).

## Example

```tsx
import * as React from "react";
import { Panel, TimeTracker } from "@twentyfirstmedia/halo";

const NOW = new Date(2026, 10, 16, 11, 12);

export default function Preview() {
  const [running, setRunning] = React.useState(true);
  const [task, setTask] = React.useState("Checkout flow: address step");
  const [project, setProject] = React.useState("Nordhafen · Website relaunch");
  const [billable, setBillable] = React.useState(true);
  return (
    <Panel title="Time">
      <TimeTracker
        running={running}
        startedAt={new Date(NOW.getTime() - 2537000)}
        now={NOW}
        task={task}
        onTask={setTask}
        project={project}
        projects={["Nordhafen · Website relaunch", "Velo Werk · App redesign", "Internal"]}
        onProject={setProject}
        billable={billable}
        onBillable={setBillable}
        onStart={() => setRunning(true)}
        onStop={() => setRunning(false)}
        entries={[
          {
            id: "1",
            project: "Nordhafen · Website relaunch",
            task: "Stand-up and planning",
            minutes: 30,
            billable: true,
          },
          {
            id: "2",
            project: "Velo Werk · App redesign",
            task: "Onboarding screens",
            minutes: 95,
            billable: true,
          },
          { id: "3", project: "Internal", task: "Hiring: portfolio reviews", minutes: 45 },
        ]}
      />
    </Panel>
  );
}
```

## Props

### TimeTracker

| Prop | Type | Notes |
| --- | --- | --- |
| `running?` | `boolean` |  |
| `startedAt?` | `Date \| string \| number` |  |
| `now?` | `Date \| string \| number` | Fixed "now" for the timer; ticks every second when unset. |
| `task?` | `string` |  |
| `onTask?` | `(task: string) => void` |  |
| `project?` | `string` |  |
| `projects?` | `string[]` |  |
| `onProject?` | `(project: string) => void` |  |
| `billable?` | `boolean` |  |
| `onBillable?` | `(billable: boolean) => void` |  |
| `onStart?` | `() => void` |  |
| `onStop?` | `() => void` |  |
| `entries?` | `TimeEntry[]` | Today's entries under the timer, with their total. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Panel

| Prop | Type | Notes |
| --- | --- | --- |
| `side?` | `boolean` |  |
| `title?` | `string` |  |
| `subtitle?` | `string` |  |
| `action?` | `ReactNode` |  |
| `children?` | `ReactNode` |  |
| `surface?` | `Surface` | `"glass"`: translucent glass over what is behind (maps, 3D, video, photos); `"solid"` opts out inside a glass `UIProvider`. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
