Skip to content

Feature: Built-in event category filtering with toggle UI #1

@thbst16

Description

@thbst16

Description

When building timelines with many events spanning different categories (e.g., "Super Bowls", "Expansion Teams", "Rule Changes"), users need a way to filter the view to focus on specific event types.

Use Case

My NFL timeline has 40+ events across categories like founding events, championship games, team expansions, and rule changes. Users should be able to toggle categories on/off to focus on what interests them.

Proposed Solution

  • Add an optional category property to the event data structure
  • Provide a showCategoryFilter prop that renders a toggle UI
  • Support onCategoryChange callback for custom filter implementations
  • Allow styling of category chips/toggles via theme

Example API

<Timeline
  data={data}  // events include { category: 'super-bowl' }
  showCategoryFilter={true}
  categoryLabels={{ 'super-bowl': 'Super Bowls', 'expansion': 'Expansion Teams' }}
/>

Issue generated from user feedback while building an NFL history timeline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions