Skip to content

Instantly share code, notes, and snippets.

@otobrglez
Created December 18, 2025 13:23
Show Gist options
  • Select an option

  • Save otobrglez/41d64f3e832d5ce2e1982fb0f5bc4272 to your computer and use it in GitHub Desktop.

Select an option

Save otobrglez/41d64f3e832d5ce2e1982fb0f5bc4272 to your computer and use it in GitHub Desktop.
id: 002-micro
title: Simple example
optionSets:
shirtSizes:
- { value: "S", label: "Small" }
- { value: "M", label: "Medium" }
- { value: "L", label: "Large" }
- { value: "XL", label: "Extra Large" }
blocks:
- id: beginning
title: First block
pages:
- id: intro
title: Getting started
nodes:
- id: greet
markdown: Hello. This is Survey Definition Language (SDL DSL)
type: text
- id: name
label: What is your name?
type: question
- id: age
label: How old are you?
type: number
- type: text
markdown: "You are older than 18 years old."
id: older_than_18
showIf: age > 18
- type: text
markdown: "You are not older than 18 years old."
id: younger_than_18
showIf: age <= 18
- type: radio
label: What is your favorite color?
id: color
options:
sources:
- inline:
- { value: "red", label: "Red" }
- { value: "green", label: "Green" }
- { value: "blue", label: "Blue" }
- id: middle
title: Middle block
showIf: age == 40
pages:
- id: middle_page
title: Middle page
nodes:
- id: middle_node
type: text
markdown: This is middle page.
- id: finish
title: Finish
showIf: 1 != 2
pages:
- id: last
title: Done
showIf: true != false
nodes:
- id: shirtSize
label: What size shirt do you wear?
type: radio
options:
sources:
- optionSet: shirtSizes
- inline:
- { value: "XXL", label: "Extra Extra Large" }
- id: final_text
markdown: Done.
type: text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment