Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

SettingsLayout

Open .md
Live preview

Loading example…

Two-column settings grid (side nav + content). Stacks to one column under breakpoint (940 px by default) of the measured container, never of the viewport.

import { SettingsLayout } from "@jcsoftdev/ui/containers";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/settings-layout.

<SettingsLayout>
<>
<SettingsLayoutNav aria-label="Secciones de configuración">
<SettingsLayoutNavItem active>Negocio</SettingsLayoutNavItem>
<SettingsLayoutNavItem>Horarios</SettingsLayoutNavItem>
<SettingsLayoutNavItem>Servicios</SettingsLayoutNavItem>
<SettingsLayoutNavItem>Notificaciones</SettingsLayoutNavItem>
</SettingsLayoutNav>
<SettingsLayoutMain>
<Card>
<CardHeader>
<h3 className="m-0 font-semibold text-[14px]">Recordatorios</h3>
</CardHeader>
<SettingsRow
title="Recordatorio por WhatsApp"
description="Se envía 2 horas antes de la cita."
control={<Switch defaultChecked aria-label="Recordatorio por WhatsApp" />}
/>
<SettingsRow
title="Reseña tras el servicio"
description="Pide una reseña al terminar la cita."
control={<Switch aria-label="Reseña tras el servicio" />}
/>
</Card>
<Card>
<CardHeader>
<h3 className="m-0 font-semibold text-[14px]">Cobros</h3>
</CardHeader>
<SettingsRow
title="Aceptar Yape y Plin"
control={<Switch defaultChecked aria-label="Aceptar Yape y Plin" />}
/>
</Card>
</SettingsLayoutMain>
</>
</SettingsLayout>
Prop Type Default Description
breakpoint "never" | 720 | 1280 | 940 | 1080 940 Container width (px) under which the nav and the content stack. "never" keeps two columns. Defaults to 940. SettingsLayoutNav follows it without being told.
container "page" | "self" "page" Which container is measured. "page" (default) is the ancestor @container/page; "self" wraps the layout in its own container, for use outside a page shell.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/containers/settings-layout/settings-layout.tsx