Skip to content

Component definition

A Component definition declares one Component, its typed props, and its renderings, shared by every Site and App in the Studio.

PropertyValue
Pathcomponents/[Name].mdx
HoldsComponent
Kindfile
Leadersdb-first, git-first
TeamProduct Team
Written byChange.merge
Compiled bySiteBuilder

Example

components/CloseProgress.mdx in a Startup repository. Closewise, a sample business, declares a Close Noun.

components/CloseProgress.mdx
---
props:
  close: { type: Close, required: true }
renderers: [web, markdown]
---
Shows how far one month's close has come: reconciled, reviewed, closed.

Props

The frontmatter keys the file takes. The body is its prose.

PropTypeRequiredDescription
propsjsonrequiredEach prop with its type, a scalar or a Noun name, and whether it is required.
renderersstring[]The renderings it ships: web, native and markdown.

Generates

SiteBuilder compiles it into these records, Verbs and routes.

KindWhat
RecordsComponent
VerbsNone.
RoutesNone.