Skip to content

Component code

Component code is a Component’s web rendering, composed from the kernel components, beside the file that types its props.

PropertyValue
Pathcomponents/[Name].tsx
HoldsComponent
Kindfile
Leadersdb-first, git-first
TeamProduct Team
Written byNone.
Compiled bySiteBuilder

Example

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

components/CloseProgress.tsx
import { StateBadge, Timeline } from 'startup-builder/ui'

export default function CloseProgress({ close }: { close: Close }) {
  return (
    <section>
      <h3>{close.period}{close.balanced ? ': balanced' : ''}</h3>
      <StateBadge thing={close.$id} />
      <Timeline thing={close.$id} />
    </section>
  )
}

Exports

ExportKindType
defaultdefault(props: Props) => JSX.Element

Signature

TypeScript
(props: Props) => JSX.Element

Generates

SiteBuilder compiles it into these records, Verbs and routes.

KindWhat
RecordsComponent
VerbsNone.
RoutesNone.