Web Overlay

Section

A collapsible card container for grouping related fields.

Section is a card container that groups related Field components together under a titled header. It should always be a direct child of SectionGrid.

import { Section } from "@/components/section";

<Section title="General">
  <Field name="Enable">
    <Switch ... />
  </Field>
</Section>

Props

PropTypeDefaultDescription
titlestringThe section header title
descriptionstringSmall subtext shown below the title
iconReactNodeOptional icon shown to the left of the title
iconColorstringColor applied to the icon
collapsiblebooleanfalseWhether the section can be collapsed by clicking the header
defaultCollapsedbooleanfalseWhether the section starts collapsed
childrenReactNodeField components to render inside the section

Collapsible

Add collapsible to let the user collapse and expand the section by clicking the header. Use defaultCollapsed to start it collapsed:

<Section title="Advanced" collapsible defaultCollapsed>
  <Field name="Some Setting">
    <Switch ... />
  </Field>
</Section>

With Icon

You can pass any Lucide icon and an optional color:

import { Crosshair } from "lucide-react";

<Section title="Aimbot" icon={<Crosshair />} iconColor="#3b82f6">
  <Field name="Enable">
    <Switch ... />
  </Field>
</Section>

Notes

  • Sections animate in sequentially on page load based on their position in the grid.
  • The index prop is injected automatically by SectionGrid and controls the stagger delay — you don't need to set it manually.

On this page