Skip to content

Add a Categories Section

The CategoriesSection component is used to display a grid of all available categories. It already includes a Section component to handle the layout. Clicking on a category navigates to the search page filtered by the category.

Image Categories Section

Here is an example on how to use it:

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

The CategoriesSection component has the following properties:

type: string
example: "Categories"
required: false
default: Astro.locals.i18n.t("ln.common.categories")

The title of the categories section. By default the title is translated from the ln.common.categories key (this is “Categories” in English). In case you want to use a different title, you can set the title property.