Skip to main content

Components

Components are the fundamental building blocks of Metabind, defining reusable elements that can be used to create and render content across multiple platforms. Components can be view components that define reusable UI elements or layout components that define the structure for entire content types.

Component Types

View Components

Standard UI components for displaying content. Examples: ProductCard, ArticleParagraph, HeroImage

Layout Components

Define structure for entire content types. Examples: ArticleLayout, ProductPageLayout

Key Concepts

Component Object

Fields

Example View Component

Example Layout Component

TypeScript and Compilation

When a component is saved, the TypeScript code in the content field is automatically compiled to JavaScript and stored in the compiled field.

Schema Generation

Components with a properties() function automatically have their schema extracted:

Base URL

All component endpoints use this base path: