Skip to content
v0.2.10

Section

A named document section with a compact heading, supporting description and optional actions.

Preview

Project settings

Manage the details your team shares.

Section content stays separate from its heading and supporting text.

Use Section

Section is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
section.tsxTSX
"use client";

import { FloodRoot, Section, Text } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Section title="Project settings" description="Manage details your team shares." headingLevel={2}>
        <Text as="p">Section content.</Text>
      </Section>
    </FloodRoot>
  );
}

Design notes

  • Section renders a native section and heading. A generated heading ID labels the region; explicit id creates a deterministic heading ID. headingLevel follows the host document hierarchy.
  • The title and description share a close text column; actions align separately and wrap when necessary. It adds no surface or border. Compose Surface or another container inside when content needs its own background.
  • Original compatible addition in the unpublished 0.2.5 source candidate.
  • headingLevel chooses h2–h6 for the document outline; it does not set the visual scale. headingSize independently selects the existing Heading typography role (section by default).

API reference

PropValuesDefault
titlestringRequired
descriptionReactNode—
actionsReactNode—
headingLevel2 | 3 | 4 | 5 | 62
headingSize"display" | "large" | "page" | "section""section"
Native HTML propsOmit<HTMLAttributes<HTMLElement>, "title">Forwarded
View TypeScript source