Skip to content

Add new box types to the bento library #10

Description

@dcondrey

The Overview board is a library of "boxes", each in its own file under apps/dashboard/src/components/boxes/ exporting a TileDef. Adding a box is intentionally a one-file change plus one line in boxes/index.ts.

Great candidates for new boxes:

  • Bounce-rate over time (line/area)
  • New vs returning visitors (stacked)
  • Top entry / exit pages
  • Browser / OS breakdown
  • Hourly heatmap (day-of-week × hour)
  • Scroll-depth or time-on-page distribution

How to add one:

  1. Copy an existing box (e.g. PagesBox.tsx for a list, EventsBox.tsx for a KPI).
  2. Implement render(ctx, expanded) using the shared TileContext; add an optional table(ctx) for the "view as table" toggle.
  3. Register it in boxes/index.ts.

Data plumbing lives in the TileContext (see boxes/types.ts). Reuse ListBody/rowsTable from boxes/shared.tsx where it fits. Pick any one box and open a PR — each is self-contained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions