Skip to content
v0.2.10

DescriptionList

Related terms and descriptions with native list semantics and responsive grouping.

Preview
Project
Flood design system
Version
0.2.10
Owner
Design team

Use DescriptionList

DescriptionList 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
description-list.tsxTSX
"use client";

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

export function Example() {
  return (
    <FloodRoot>
      <DescriptionList items={[
        {id:"project",term:"Project",description:"Flood"},
        {id:"version",term:"Version",description:"0.2.4"},
      ]} />
    </FloodRoot>
  );
}

Design notes

  • Renders native dl/dt/dd groups. IDs are stable React keys, not generated DOM anchors; require unique nonempty IDs.
  • Inline layout becomes stacked when the component container is narrow. Stacked layout is always one column.
  • Density and dividers affect presentation. Values may contain React content; the host owns formatting and missing-value text.
  • Native dl props, className/style and HTMLDListElement ref target the list. Available in 0.2.4.

API reference

PropValuesDefault
itemsreadonly DescriptionItem[]Required
layout"inline" | "stacked""inline"
density"compact" | "comfortable""compact"
dividersbooleanfalse
Native HTML propsOmit<HTMLAttributes<HTMLDListElement>, "children">Forwarded
View TypeScript source