PropertyTable
Document configuration options, API parameters, and component props with types, defaults, required flags, deprecation notices, and nested properties.
Import
Section titled “Import”import { PropertyTable, Property, PropertyGroup, Expandable } from "@nu-appdev/northwestern-starlight-theme/components";Basic Usage
Section titled “Basic Usage”<PropertyTable title="NorthwesternThemeConfig"> <Property name="homepage" type="NorthwesternHomepageConfig"> Homepage hero layout configuration. See below for nested options. </Property> <Property name="mermaid" type="boolean | object" default="true"> Mermaid diagram support. Set `false` to disable. Pass an object to override the default mermaid config. </Property></PropertyTable>Required Fields
Section titled “Required Fields”Use the required prop to display a “Required” badge.
<PropertyTable title="POST /api/users"> <Property name="email" type="string" required> The user's email address. Must be unique. </Property> <Property name="name" type="string" required> Display name. </Property> <Property name="role" type='"admin" | "editor" | "viewer"' default='"viewer"'> Permission level for the new user. </Property></PropertyTable>Optional Indicator
Section titled “Optional Indicator”Use showOptional on the table to label non-required properties.
<PropertyTable showOptional> <Property name="email" type="string" required> The user's email address. </Property> <Property name="avatar" type="string"> URL to a profile image. </Property></PropertyTable>Nested Properties
Section titled “Nested Properties”Use <Expandable> inside a <Property> to show child properties in a collapsible section.
Arbitrary key-value pairs.
<PropertyTable> <Property name="metadata" type="object"> Arbitrary key-value pairs. <Expandable title="properties"> <Property name="department" type="string"> Organizational department. </Property> <Property name="netid" type="string"> Northwestern NetID. </Property> </Expandable> </Property></PropertyTable>Deprecated Fields
Section titled “Deprecated Fields”The deprecated prop strikes through the name and desaturates the row. The since prop adds a version badge.
<PropertyTable> <Property name="apiKey" type="string" deprecated> **Deprecated.** Use `token` instead. Will be removed in v3.0. </Property> <Property name="token" type="string" required since="2.0"> Authentication token from the dashboard. </Property></PropertyTable>Linked Types
Section titled “Linked Types”typeHref makes the type annotation a clickable link, useful for linking to type definitions or external documentation.
Mailable class for outbound email.
Notification channel configuration.
Queue connection and driver settings.
<Property name="mailables" type="Illuminate\Mail\Mailable" typeHref="https://laravel.com/docs/mail#generating-mailables"> Mailable class for outbound email.</Property>Table Variant
Section titled “Table Variant”variant="table" renders a columnar grid. Columns default to Prop / Type / Default, configurable via the columns prop.
<PropertyTable variant="table" title="Dialog"> <Property name="open" type="boolean" /> <Property name="modal" type="boolean" default="true" /></PropertyTable>Table with Badges
Section titled “Table with Badges”Badges display inline next to the property name.
On mobile, the table variant falls back to the list layout.
Custom Columns
Section titled “Custom Columns”Control which columns appear and their labels with the columns prop. Pass field keys ("name", "type", "default") or { key, label } objects.
<PropertyTable variant="table" columns={[ { key: "name", label: "Data attribute" }, { key: "type", label: "Values" }, ]}> <Property name="[data-state]" type='"open" | "closed"' /> <Property name="[data-disabled]" type="Present when disabled" /></PropertyTable>Grouped Properties
Section titled “Grouped Properties”<PropertyGroup> adds subheading dividers to break large tables into sections.
<PropertyTable title="ServerConfig"> <PropertyGroup title="Connection"> <Property name="host" type="string" default='"localhost"'> Server hostname. </Property> <Property name="port" type="number" default="3000"> Port to listen on. </Property> </PropertyGroup> <PropertyGroup title="Security"> <Property name="tls" type="boolean" default="false"> Enable TLS encryption. </Property> </PropertyGroup></PropertyTable>Without Title
Section titled “Without Title”Omit title for inline property lists.
<PropertyTable> Props
Section titled “<PropertyTable> Props”Implementation: PropertyTable.astro
Heading displayed in the card header.
"list" renders stacked rows with descriptions. "table" renders a columnar grid.
Columns for table variant. Each entry is a field key ("name", "type", "default") or a { key, label } object for custom headers.
Labels non-required, non-deprecated properties as “Optional.”
<Property> Props
Section titled “<Property> Props”Implementation: Property.astro
Property name, displayed in monospace.
Type annotation in monospace. Supports union syntax like "string | number".
URL to link the type annotation to. Makes the type clickable.
Default value, displayed in a purple-tinted badge.
Displays a “Required” badge.
Strikes through the name and desaturates the row.
Version added. Displays a teal badge.
<PropertyGroup> Props
Section titled “<PropertyGroup> Props”Implementation: PropertyGroup.astro
Group heading text, rendered as a full-width subheading row.
<Expandable> Props
Section titled “<Expandable> Props”Implementation: Expandable.astro