Props table
ProA component's props as a table: name, type, default and description, for documentation. Not an M3 component (@windmorph/react-pro).
import { PropsTable } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
PropsTable 7 props
The props, one row each, in order.
Names the scrollable region and the table; visually hidden. Wins over
labels.caption.Ref to the root element (the scroll region). Its other props (
id,aria-*,data-*) go to it too.
Text
The caption, column headings and required note, merged over the English defaults.
Names the scrollable region and the table (visually hidden).
The name column's header.
The type column's header.
The default value column's header.
The description column's header.
Read after a required prop's name.
Classes for the root (the scroll region); they win over the defaults via
cn().Classes for each part.
The focusable scroll region around the table (the same element as
className).The
<table>.The
<thead>.Each body row.
Every header cell: the column headings and each row's name cell.
Every body data cell.
Each row's name cell.
Each row's type cell.
Each row's default cell.
Each row's description cell.
Inline styles for the root.
Also accepts the root element's HTML attributes (id, data-*, event handlers).
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
M3 Expressive specs
- Shape
rounded-corner-medium
Rows and styling
- Each row is a
PropsTableRow:name,type, and optionallydefaultValue,description(plain text) andrequired. Names must be unique. classNameandstylego on the scroll region, the outermost element;classNamesstyles the table, its head, rows, header and data cells, and each column's cells.- It has no tokens of its own:
surfacewithoutline-variantborders and medium corners, and its root carriesdata-tokens="wm-props-table". labelsholds the caption, the four column headings and the word read after a required prop;captionwins overlabels.caption.