CategoryTabs
A horizontal tab bar that displays menu categories with an active indicator. Sticks to the top of the viewport as the user scrolls through the menu.Preview
View in StorybookImport
Usage
Props
Array of menu categories to display as tabs.
The ID of the currently active/visible category.
Callback fired when a tab is clicked — typically scrolls to the category section.
Behavior
- Sticks to the top of the viewport below the header on scroll
- Highlights the active category based on scroll position
- Horizontally scrollable on mobile for long category lists
- Smooth-scrolls the active tab into view automatically