Component definition
A Component definition declares one Component, its typed props, and its renderings, shared by every Site and App in the Studio.
| Property | Value |
|---|---|
| Path | components/ |
| Holds | Component |
| Kind | file |
| Leaders | db-first, git-first |
| Team | Product Team |
| Written by | Change.merge |
| Compiled by | SiteBuilder |
Example
components/ in a Startup repository. Closewise, a sample business, declares a Close Noun.
---
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.
| Prop | Type | Required | Description |
|---|---|---|---|
props | json | required | Each prop with its type, a scalar or a Noun name, and whether it is required. |
renderers | string[] | The renderings it ships: web, native and markdown. |
Generates
SiteBuilder compiles it into these records, Verbs and routes.
| Kind | What |
|---|---|
| Records | Component |
| Verbs | None. |
| Routes | None. |