Skip to content

Commit

Permalink
🎨 Add ui dsl yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 21, 2025
1 parent 3bf8a94 commit 7c8368d
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions ttmp/2025-02-21/ui-dsl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# UI DSL Schema
# Each component has common attributes:
# - id: unique identifier (optional)
# - style: inline CSS (optional)
# - disabled: boolean (optional)
# - data: map of data attributes (optional)

# Example components:
---
button:
text: Click me
type: primary # primary, secondary, danger, success
id: submit-btn
disabled: false
onclick: alert('clicked')

title:
content: Welcome to My App
id: main-title

text:
content: This is a paragraph of text that explains something.
id: description

input:
type: text # text, email, password, number, tel
placeholder: Enter your name
value: ""
required: true
id: name-input
data:
validate: true
maxlength: 50

textarea:
placeholder: Enter description
rows: 4
cols: 50
value: |
Default multiline
text content
checkbox:
label: Accept terms
checked: false
required: true
name: terms
id: terms-checkbox

list:
type: ul # ul or ol
items:
- First item
- Second item
- Third item with:
button:
text: Click me
type: secondary

# Complex example with nested components
form:
id: signup-form
components:
- title:
content: Sign Up
- text:
content: Please fill in your details below.
- input:
type: email
placeholder: Email address
required: true
- input:
type: password
placeholder: Password
required: true
- checkbox:
label: Subscribe to newsletter
- button:
text: Submit
type: primary

0 comments on commit 7c8368d

Please sign in to comment.