QORMQORM v0.9.8 api Get started 中

Widget Catalog

Auto-generated from the node() switch in internal/render/render.go (TestWidgetCatalogInSync) — do not edit by hand.

Each widget lists its canonical name first; the rest are equivalent aliases. Prefer the canonical name when writing apps.

CanonicalAliasesRenderer
accordion—accordion
actionsheetcupertinoactionsheetactionSheet
activityindicatorcupertinoactivityindicatoractivityIndicator
alertbanneralert
alertdialogcupertinoalertdialogalertDialog
animatedcontaineranimated_container, animatedpadding, animatedalign, animatedpositionedanimatedContainer
animatedopacity—animatedOpacity
appbar—appbar
aspectratio—aspectRatio
autocomplete—autocomplete
avatar—avatar
backbutton—backButton
badge—badge
barometer—hwList
battery—hwList
biometricfaceid, fingerprintbiometric
bluetooth—hwList
board—board
bottomappbar—bottomAppBar
bottomnavbottomnavigationbar, navigationbarbottomNav
breadcrumb—breadcrumb
brightness—hwAdjust
button—button
calendar—hwList
camera—camera
carousel—carousel
chart—chart
checkboxswitchcheckbox
chipinputchip, choicechip, filterchipchip
circularprogresscircularprogressindicatorcircularProgress
clipboard—hwList
closebutton—closeButton
compassheadinghwList
contacts—hwList
contextmenucupertinocontextmenucontextMenu
datatable—datatable
datepickercupertinodatepickerdatepicker
descriptionskeyvaluedescriptions
deviceinfo—hwList
dismissible—dismissible
divider—divider
dockbadge—dockBadge
draggablelongpressdraggabledraggable
dragtargetdroptargetdragTarget
drawer—drawer
dropdownbutton—dropdownButton
empty—empty
expansiontileexpansionpanelexpansionTile
fabfloatingactionbuttonfab
fieldformfieldfield
filepickerfilehwList
form—form
gesturedetectorgesture, inkwellgestureDetector
gridview—gridView
haptics—hwList
icon—icon
ignorepointerabsorbpointerignorePointer
image—image
indexedstack—indexedStack
input—input
insetssafeareahwList
keepawakewakelockhwList
largetitlecupertinolargetitle, sliverappbarlargeTitle
limitedbox—limitedBox
link—link
list—list
listsectioncupertinolistsectionlistSection
listtilelistitemlistTile
locationgeolocationlocation
loginitemstartatloginloginItem
materialstepper—materialStepper
menu—menu
modaldialogmodal
monthviewcalendarview, datepickercalendarmonthView
navigationdrawer—navigationDrawer
navigationrail—navigationRail
network—hwList
nfc—hwList
notify—notify
offstage—offstage
openurlopenlinkhwList
orientation—hwList
pageview—pageView
pagination—pagination
path—path
pedometer—hwList
photopickerphotohwList
pickercupertinopickerpicker
progress—progress
proximity—hwList
qrscanbarcodehwList
radio—radio
rangeslider—rangeSlider
rating—rating
recorderaudiorecorderrecorder
refreshindicator—refreshIndicator
richtext—richText
scaffold—scaffold
screenrecordscreenrecordinghwList
screensdisplaysscreens
screenshotscreencapturehwList
searchbar—searchbar
securestoragekeychainhwList
segmentedslidingsegmentedcontrol, cupertinoslidingsegmentedcontrolsegmented
selectdropdownselectBox
selectabletext—selectableText
sensors—sensors
share—hwList
sheetbottomsheet, draggablesheet, draggablescrollablesheet, modalbottomsheetsheet
skeleton—skeleton
slider—slider
slot—slot
snackbar—snackbar
spacer—spacer
spinner—spinner
statmetricstat
stepssteppersteps
storage—hwList
sttspeechinputhwList
swipeactionsswipeactionswipeActions
switchlisttilecheckboxlisttile, radiolisttilecontrolTile
systemmodesmodeshwList
table—table
tabs—tabs
tag—tag
text—text
textarea—textarea
textformfield—textFormField
tilemap—tilemap
timeline—timeline
timepickercupertinotimepickertimepicker
timer—timer
tooltip—tooltip
torchflashlighthwList
transformrotatedboxtransform
tree—tree
ttsspeakhwList
verticaldivider—divider
vibrate—hwList
video—video
videocapture—hwList
volume—hwAdjust
webview—webview
when—when
wifi—hwList
wrap—wrap

RichText Widget

The richtext widget allows displaying mixed-style text within a single paragraph. It takes a spans array, where each span is an object containing text and style.

{
  "type": "richtext",
  "spans": [
    { "text": "Hello ", "style": { "color": "red" } },
    { "text": "World", "style": { "fontWeight": "bold" } }
  ]
}

Video Widget

The video widget allows displaying video content. You can configure properties such as src, loop, autoplay, and muted.

{
  "type": "video",
  "src": "https://www.w3schools.com/html/mov_bbb.mp4",
  "loop": true,
  "autoplay": true,
  "muted": true
}

Accessibility (A11y)

Canvas nodes support accessibility labels via the aria-label property. These are critical for making apps usable with screen readers. You can apply an aria-label to any interactive node or structural container to provide a descriptive label.

{
  "type": "button",
  "aria-label": "Play the game",
  "children": [
    { "type": "icon", "props": { "icon": "play" } }
  ]
}