CategoryTabs
Need an API key?
Get one from Crave Dashboard > Developers > API Development > Step 1 - API Keys. Copy the matching
locationId from Step 2 - Location IDs on the same page.Preview
Import
Usage
Props
Category[]
required
Array of menu categories to display as tabs.
string
required
The ID of the currently active/visible category.
(categoryId: string) => void
required
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