Skip to content

Components

SettingGroup

Workspace preferences

Opens when you enter the workspace.
Time zoneUsed for dates in workspace activity.
Help center

Component reference

Properties

Use SettingGroup

A named section of settings with shared row spacing.

Example import style
setting-group.tsxTSX
"use client";

import { FloodRoot, SettingGroup, Switch, SettingRow, Link } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <SettingGroup title="Notifications"><Switch layout="row" label="Weekly summary" /><SettingRow label="Delivery history" action={<Link href="/notifications">View history</Link>} /></SettingGroup>
    </FloodRoot>
  );
}

Design notes

  • Compose SettingRow for actions, row-layout Switch for on/off values, and Field layout=adaptive for editable scalar settings. Use Fieldset when controls share a form legend or validation boundary.
  • Choose layout=aligned in a mixed settings panel when direct adaptive Fields and SettingRows should share the same columns and stack at the same group width. Row-layout switches keep their trailing position.
  • Choose headingLevel for the surrounding page. Use spacing to separate rows by default. Enable dividers when dense adjacent items are hard to distinguish.

API reference

PropValuesDefault
titlestringRequired
descriptionReactNode—
actionsReactNode—
headingLevel2 | 3 | 4 | 5 | 6—
headingSizeHeadingProps["size"]"group"
density"compact" | "comfortable""comfortable"
dividersbooleanfalse
layout"adaptive" | "aligned""adaptive"
Native HTML propsOmit<HTMLAttributes<HTMLElement>, "title">Forwarded
View TypeScript source