Component Gallery
Every component available in yamlCase, with live examples and YAML code. Copy any snippet directly into your views.
Layout Components
Structure your page with containers, grids, and spacing components.
container
Layout
This content is inside a container. Containers group elements and can have className, style, and event handlers.
- type: container
className: my-wrapper
children:
- type: text
content: Wrapped content here
grid
Layout
Column 1
First grid item
Column 2
Second grid item
Column 3
Third grid item
- type: grid
columns: 3
gap: 1rem
children:
- type: card
title: Column 1
body: Content here
divider
Layout
Content above the divider
Content below the divider
- type: divider
Content Components
Display text, headings, images, and rich content.
heading
Content
Heading Level 1
Heading Level 2
Heading Level 3
Heading Level 4
- type: heading
text: My Heading
level: 2
text
Content
Regular paragraph text. Supports bold and *italic* via markdown.
This is lead text — larger and lighter for introductions.
This is muted text for secondary information.
- type: text
content: Your text here
variant: lead # or muted, small
code_block
Content
function greet(name) {
return `Hello, ${name}!`;
}
- type: code_block
title: My Code
language: javascript
code: |
const x = 42;
Data Display Components
Cards, badges, tables, and other data presentation components.
card
Data Display
Basic Card
Simple card with title and body text.
Card with Subtitle
A helpful subtitle
Cards can have titles, subtitles, body text, and footers.
Card with Footer
This card has a footer section.
- type: card
title: My Card
subtitle: Optional subtitle
body: Card content here
footer: Optional footer
badge
Data Display
- type: badge
text: Status
variant: success # primary, secondary, success, danger, warning, info, light, dark
progress_bar
Data Display
25% Complete
60% Complete
90% Complete
- type: progress_bar
value: 75
variant: success # primary, success, warning, danger
Feedback Components
Alerts, notifications, and user feedback elements.
alert
Feedback
- type: alert
variant: info # info, success, warning, danger
title: Alert Title
message: Alert message text
Form Components
Input fields, buttons, selects, and other form elements for building interactive forms.
button
Form
- type: button
text: Click Me
variant: primary
onClick: handleClick
input
Form
- type: fieldset
label: Field Label
children:
- type: input
placeholder: Placeholder text
value: "${stateVar}"
onChange: handleChange
select
Form
- type: select
options:
- label: Option 1
value: opt1
- label: Option 2
value: opt2
value: "${selectedValue}"
onChange: handleSelect
Interactive Components
Components with built-in interactivity — tabs, accordions, modals, and more.
tabs
Interactive
Tabs allow users to switch between different content panels without page navigation.
- type: tabs
items:
- label: Tab 1
children:
- type: text
content: First tab content
- label: Tab 2
children:
- type: text
content: Second tab content
playground
Interactive
The playground component embeds a full YAML editor with live compilation. See the Playground page for a working example.
- type: playground
title: My Playground
api_endpoint: /api/compile
Advanced Components
Conditional rendering, loops, and dynamic content generation.
if (conditional)
Advanced
Conditionally show or hide any component based on state. Add if to any component to control its visibility.
- type: alert
if: "showAlert"
variant: success
message: Only visible when showAlert is true
each (loop)
Advanced
Render a list of items dynamically from state. The each component iterates over an array and renders children for each item.
- type: each
items: "myList"
itemName: item
children:
- type: badge
text: "${item}"
variant: primary
Common Properties
These properties are available on every component type.
Universal Properties
| Property | Type | Description | |----------|------|-------------| | type | string | Required. The component type (heading, card, button, etc.) | | className | string | CSS class name(s) to apply | | style | object | Inline CSS styles | | if | expression | Conditional rendering — component only renders when truthy | | key | string | React key for list rendering | | children | array | Child components (for container-like components) | | onClick | handler | Click event handler name | | onChange | handler | Change event handler name |
Usage Tips
Start with Layout — Build your page structure first with containers and grids, then fill in content components.
Use Variants — Most components support variant props (primary, success, danger, etc.) for consistent theming.
Copy from Gallery — Copy any code snippet from this page directly into your YAML views. All examples are production-ready.
Compose Components — Nest components freely. Put cards in grids, text in containers, badges in cards — the component tree is fully composable.