Skip to content

Add a CategoriesSection

The CategoriesSection component displays all available categories on a page. It already wraps content in a Section component, which handles layout and styling.

When a user clicks on a category, they are automatically redirected to the search page filtered by that category.

Image of Categories Section

Here’s a minimal example of how to use CategoriesSection:

---
import { Page, CategoriesSection } from "lightnet/components"
---
<Page>
<CategoriesSection />
</Page>

The CategoriesSection component extends the functionality of the Section Component. This means you can use all the same props supported by Section, in addition to the ones listed here. The Section’s maxWidth option is not yet supported. CategoriesSection only implements maxWidth=wide.

type: "grid" | "carousel"
required: false
default: "carousel"

Controls how categories are displayed:

  • "grid" — Shows category cards in a static grid layout.
  • "carousel" — Displays categories in a horizontally scrollable carousel.