YAML Playground

Write YAML, explore React output. Public browser compilation is coming soon; compiler access remains controlled by yamlCase.

Live Preview (coming soon)TSX OutputOnline Compile (coming soon)115 Components

How It Works

1

Write YAML — Type or paste your component definition in the editor. Every view starts with view: and a body: list.

2

Managed compilation — With approved access, yamlCase validates YAML and generates React output.

3

Review output — Review and test the generated TSX and styles in your React project. Public browser previews are coming soon.

4

Iterate — Tweak the YAML, recompile, and refine. The playground preserves your edits so you can experiment freely.

Editor Features

Syntax Highlighting

Full YAML syntax highlighting with keyword recognition. View properties, component types, and values are color-coded for readability.

Line Numbers

Line numbers help you track your position and match error messages to specific lines in your YAML.

Feedback from the CLI

Compilation feedback helps identify invalid YAML and missing properties. Inline browser errors are coming soon.

One-Click Copy

Copy the generated TSX code with one click. Paste it directly into your React project — no modifications needed.

Live Toggle

A rendered preview and TSX toggle is coming soon. Today, read the TSX the CLI writes.

Auto-Persist

Your editor content is preserved during the session. Navigate away and come back — your YAML is still there.

Quick Tips

YAML Basics

Every view starts with view and a body list. Each body item needs a type field matching a component name.

Instant Preview (coming soon)

The rendered tab shows your components exactly as they appear in production. Toggle to TSX to see the generated code.

Templates

Use 115 built-in components like card, hero, alert, and badge. No imports needed — just set the type.

Pro Tip: Start with a simple view and add components one at a time. Compile after each addition to catch errors early. The compiler gives you line-specific error messages.


Try These Examples

Click any card below to load the example into the editor, or copy the snippets from the Starter Snippets section.

Landing Page

Hero section with heading, subtitle, and call-to-action buttons. The classic marketing page layout.

Dashboard

Stat cards in a grid with progress bars and alerts. Perfect for admin panels and analytics views.

Contact Form

Form with text inputs, textarea, select dropdown, and submit button. Includes validation patterns.

Data Table

Sortable table with headers and formatted rows. Great for displaying structured data.

Product Card

E-commerce product display with image placeholder, price, description, and add-to-cart button.

Settings Panel

Settings form with toggle switches, dropdowns, and grouped options. Common in admin interfaces.


Live Editor

YAML Playground

YAML Input16 lines

Rendered output requires approved yamlCase compilation access.


Starter Snippets

Copy these into the editor above to get started quickly. Each snippet is a complete, compilable view.

yamlSimple Page
view:
  name: MyPage
  body:
    - type: heading
      text: Hello, yamlCase!
      level: 1
    - type: text
      content: Built entirely from YAML.
      variant: lead
yamlCard Grid
view:
  name: Cards
  body:
    - type: grid
      columns: 3
      gap: 1rem
      children:
        - type: card
          title: Feature One
          body: Description here.
        - type: card
          title: Feature Two
          body: Another feature.
        - type: card
          title: Feature Three
          body: Yet another.
yamlContact Form
view:
  name: ContactForm
  body:
    - type: heading
      text: Contact Us
      level: 2
    - type: form_group
      label: Your Name
      children:
        - type: text_input
          placeholder: Enter your name
    - type: form_group
      label: Message
      children:
        - type: text_input
          placeholder: Your message
    - type: button
      text: Send Message
      variant: primary
yamlDashboard Stats
view:
  name: Dashboard
  body:
    - type: grid
      columns: 4
      gap: 1rem
      children:
        - type: card
          title: Users
          body: "1,234"
        - type: card
          title: Revenue
          body: "$45,678"
        - type: card
          title: Orders
          body: "892"
        - type: card
          title: Growth
          body: "+12.5%"
yamlStateful Counter
view:
  name: Counter
  state:
    count: "0"
  handlers:
    - name: increment
      body: "setCount(count + 1);"
    - name: decrement
      body: "setCount(count - 1);"
  body:
    - type: heading
      text: Counter Demo
      level: 2
    - type: text
      content: "Count: ${count}"
      variant: lead
    - type: grid
      columns: 2
      gap: 1rem
      children:
        - type: button
          text: "+ Increment"
          variant: primary
          onClick: "increment"
        - type: button
          text: "− Decrement"
          variant: secondary
          onClick: "decrement"
yamlLoop & Conditional
view:
  name: DynamicList
  state:
    items: "['React', 'Vue', 'Angular', 'Svelte']"
    showAll: "true"
  handlers:
    - name: toggleAll
      body: "setShowAll(!showAll);"
  body:
    - type: heading
      text: Frameworks
      level: 2
    - type: button
      text: "Toggle List"
      variant: outline-primary
      onClick: "toggleAll"
    - type: container
      if: "showAll"
      children:
        - type: each
          items: "items"
          itemName: fw
          children:
            - type: badge
              text: "${fw}"
              variant: primary

Common Errors & How to Fix Them

When the compiler encounters an issue, it returns a descriptive error message. Here are the most common ones and how to resolve them.

Indentation Error

Error: YAML indentation error at line 5

Fix: YAML uses spaces, not tabs. Each nesting level adds 2 spaces. Make sure child items are indented consistently under their parent.

Unknown Component Type

Error: Unknown component type 'heder' at line 8

Fix: Check the component name for typos. It should be heading not heder. See the YAML Spec page for all valid component types.

Missing Required Field

Error: Component 'heading' requires field 'text' at line 4

Fix: Every component type has required fields. For heading, you need text and optionally level. Check the component reference for required fields.

Invalid YAML Syntax

Error: Unexpected token at line 3, column 10

Fix: Common causes — missing colon after key, unquoted special characters (like : # @ in values), or mismatched quotes. Wrap values containing special chars in quotes.

Pro Tip: When you get an error, check the line number first. The issue is usually on that line or the line just above it. Indentation problems often cascade — fix the first error and the rest may resolve.


Online Playground

Public browser compilation is coming soon. Explore the examples now; compilation requires approved yamlCase access.

Zero Setup

This page illustrates YAML and output. Compilation is handled through yamlCase-controlled access.

Own Your Files

Your YAML stays in your hands. Copy it into your own project files and keep it in version control. Nothing is stored on our servers.

Starter Examples

Load a landing page, dashboard or form example with one click, then edit it to see how each component is described in YAML.

Managed Compilation

With approved compiler access, generate TSX and CSS from YAML, then review and test the output.

Plain-Text Diffs

YAML is plain text, so every change is easy to review. Compare versions and roll back with the git workflow you already use.

Keyboard Shortcuts

Open the shortcuts panel to see the keys for common editing actions, so you can keep your hands on the keyboard.

Coming Soon

The page demonstrates the planned workflow. Public compilation, project storage and imports are not available here yet.


Compiler Access

Compilation is managed by yamlCase. This static website does not provide a public compile API or a customer-installable compiler.

Integration Availability

Public API and MCP access are planned. Browse the YAML examples now; approved compilation access is required to generate React output.


Keyboard Shortcuts

Speed up your workflow with these keyboard shortcuts in the playground editor.

Editor Navigation

Ctrl+A — Select all text Ctrl+Z — Undo last change Ctrl+Shift+Z — Redo Ctrl+D — Duplicate current line Ctrl+/ — Toggle comment on selection Tab — Indent selection (2 spaces) Shift+Tab — Unindent selection

Compilation

Ctrl+Enter — Compile YAML Ctrl+Shift+C — Copy generated TSX Ctrl+1 — Switch to Rendered view Ctrl+2 — Switch to TSX view Ctrl+L — Clear editor Escape — Dismiss error panel


Best Practices

Start Simple — Begin with the basic view structure (name + body) and add complexity incrementally. Compile after each addition.

Consistent Indentation — Always use 2-space indentation. Mixed indentation is the #1 cause of YAML parse errors.

Quote Special Values — Values containing colons, hashes, or brackets need quotes. When in doubt, wrap the value in double quotes.

Use the TSX View — Check the generated TypeScript to understand what the compiler produces. This helps you learn the mapping between YAML and React.

Copy from Examples — Start with a working snippet from this page and modify it. It's faster than writing from scratch and avoids common syntax mistakes.

Test State Early — If your view uses state or handlers, test them in the playground before building the full page. Stateful logic is where most bugs hide.


What You Can Build

The playground supports the full yamlCase component library — everything you can build in a .yaml file works here.

Landing Pages

Hero sections, feature grids, testimonials, pricing tables, CTAs.

Dashboards

Stat cards, progress bars, tables, charts, alerts, status indicators.

Forms

Text inputs, selects, checkboxes, radio groups, file uploads, validation.

Documentation

Headings, text blocks, code examples, tabs, tables, navigation.

E-Commerce

Product cards, shopping carts, checkout flows, order summaries.

Admin Panels

Data tables, settings forms, user management, role-based layouts.


Frequently Asked Questions

Do I need to install anything to use the playground?

You can browse the examples with a web browser. Compiling YAML requires approved yamlCase access; public browser compilation is not available here yet.

Can I use the generated TSX in my own React project?

Absolutely. The generated TSX is production-ready React code. Copy it into your project, import the component, and it works. No runtime dependencies on yamlCase.

What happens if my YAML has errors?

The compiler returns a descriptive error message with the line number and column where the problem was detected. Fix the indicated line and recompile. See the Common Errors section above for the most frequent issues.

Is there a limit to how complex my YAML can be?

No hard limit. The compiler handles views with hundreds of components, nested grids, state management, event handlers, effects, and conditional rendering. For very large views, consider splitting into multiple views and using multi-view assembly.

Can I add custom CSS styles?

Yes. Add a styles: section to your view YAML. Define CSS classes and reference them with className on any component. Styles are scoped to the view and compiled into a separate CSS file.

How do I add interactivity (state, click handlers)?

Add a state: section for reactive variables and a handlers: section for functions. Reference state in expressions like ${count} and handlers in events like onClick: 'increment'. See the Stateful Counter snippet above for a working example.

Will my playground work be saved?

Keep your own copy of YAML edits. This website does not provide saved projects, version history or shareable project storage.


Ready to Build?

Start with a snippet from above, or write your own YAML from scratch. The playground is your sandbox — experiment, break things, and learn by doing. When you're ready for production, check out the Builder page for the full visual editor experience.