Skip to main content

Component Reference

This page lists every generic element type the Griffon renderer supports, the fields each one actually reads, and the event payload interactive elements send to your interactions. For the manifest structure itself ([plugin], [store], sections, nesting with children, {{store.*}} binding), see The UI Manifest & Store.

Fields not listed here are ignored by the renderer. Unknown type values render nothing.

Common fields​

FieldTypeRequiredMeaning
typestringYesOne of the types below.
idstringYes at section level, optional when nestedElement identifier, also used as the HTML id. Griffon refuses to load a manifest if a direct [[ui.sections.contents]] entry has no id. Give nested elements one too, and keep them unique.
actionstringNoAction name emitted on user interaction (interactive elements only). Without it, the element emits nothing.

Event payloads​

When an interactive element emits its action, the event object is available in interaction steps as event.*. For input, select, switch, checkbox and tabs, the event contains all of the element's own fields (event.id, event.label, ...) plus the new value or checked. Each component section below lists what it adds.

Things to know before you build​

Current renderer limitations
  • Only text resolves {{store.*}} templates, and only in its name. Every other field (button labels, progress.value, checked, value, ...) is static.
  • Containers do not pass the store to their children. A templated text or a table with from placed inside a row, column, group or tabs renders empty. Keep store-bound elements directly under [[ui.sections.contents]].
  • Initial values are read once. value and checked on inputs only set the starting state; they are not kept in sync with the store. Make them match your [store] defaults.

Styling values​

Tones​

Only text reads tone. Other elements ignore it.

ToneEffect
neutral (default)Normal foreground colour
infoBlue
successGreen
warningAmber
dangerRed

Gap scale​

Used by row, column and group.

Valuenonexssmmd (default)lgxl
Spacing00.25rem0.5rem1rem1.5rem2rem

Variants differ per component and are documented in each section.


Display elements​

text​

Static or store-bound text.

FieldTypeRequiredDefaultMeaning
namestringYesText content. Supports {{store.<path>}}. If it resolves to an empty string, nothing is shown.
variantstringNobodybody, title (large bold), subtitle (medium semibold), caption (small, muted), status (small, medium weight)
tonestringNoneutralSee Tones.
alignstringNoleftleft, center, right
[[ui.sections.contents]]
type = "text"
id = "quarantine_error_text"
name = "{{store.quarantine_result.error}}"
variant = "caption"
tone = "danger"

badge​

A small pill label.

FieldTypeRequiredDefaultMeaning
namestringYesBadge text (static).
variantstringNodefaultdefault (primary colour), secondary, outline, destructive (red), success (green)
[[ui.sections.contents]]
type = "badge"
id = "engine_badge"
name = "Engine ready"
variant = "success"

progress​

A progress bar. The value is static: it cannot be bound to the store.

FieldTypeRequiredDefaultMeaning
valuenumberYesProgress from 0 to 100.
labelstringNoText shown above the bar, on the left.
show_valueboolNofalseShows <value>% above the bar, on the right.
[[ui.sections.contents]]
type = "progress"
id = "setup_progress"
label = "Setup"
value = 60
show_value = true

card​

A bordered card with a title and an optional description. It does not render children; use group or column to hold content.

FieldTypeRequiredDefaultMeaning
namestringYesCard title.
descriptionstringNoMuted text under the title.
[[ui.sections.contents]]
type = "card"
id = "status_card"
name = "Protection status"
description = "Signatures are loaded from the local database."

divider​

A horizontal or vertical separator line.

FieldTypeRequiredDefaultMeaning
orientationstringNohorizontalhorizontal or vertical. Ignored when label is set.
labelstringNoSmall uppercase text centred in a horizontal line.
[[ui.sections.contents]]
type = "divider"
id = "advanced_divider"
label = "Advanced"

Interactive elements​

button​

Emits its action on click. While the action's interaction runs (for example a long execute_function), the button shows a spinner and ignores further clicks.

FieldTypeRequiredDefaultMeaning
namestringYesButton label.
actionstringNoAction emitted on click.
variantstringNoprimaryprimary, secondary or outline. Any other value looks like primary.
sizestringNomdsm, md, lg
confirmationstringNoIf set, clicking opens an "Are you sure?" dialog showing this message (followed by "This action cannot be undone."). The action is emitted only on Confirm.

Event: { source = <id>, type = "click" }

[[ui.sections.contents]]
type = "button"
id = "delete_bt"
name = "Delete selected"
variant = "secondary"
confirmation = "Delete the selected threats? This is irreversible."
action = "scanner.delete_selected_threats"

input​

A single-line text field. It emits on every keystroke.

FieldTypeRequiredDefaultMeaning
labelstringNoLabel above the field.
placeholderstringNoPlaceholder text.
valuestringNoInitial value.
input_typestringNotextHTML input type: text, number, password, email, search, url
descriptionstringNoMuted helper text below the field.
disabledboolNofalseDisables the field.
actionstringNoAction emitted on change.

Event: element fields + value (string, even with input_type = "number").

[[ui.sections.contents]]
type = "input"
id = "threads_input"
label = "Thread count"
placeholder = "Enter thread number..."
input_type = "number"
action = "scanner.set_threads"

select​

A single-choice dropdown.

FieldTypeRequiredDefaultMeaning
optionsarray of { label, value }YesChoices. value must be a non-empty string.
valuestringNoInitially selected value.
labelstringNoLabel above the dropdown.
placeholderstringNoSelect an optionShown when nothing is selected.
descriptionstringNoMuted helper text below.
disabledboolNofalseDisables the dropdown.
actionstringNoAction emitted on change.

Event: element fields + value (the chosen option's value).

[[ui.sections.contents]]
type = "select"
id = "threads_select"
label = "Threading"
options = [
{ "value" = "auto", "label" = "Auto" },
{ "value" = "max", "label" = "Max" },
{ "value" = "off", "label" = "Off" },
]
value = "auto"
action = "scanner.set_threading"

switch​

An on/off toggle in a bordered row, with the label on the left.

FieldTypeRequiredDefaultMeaning
labelstringYesLabel text.
descriptionstringNoMuted helper text under the label.
checkedboolNofalseInitial state.
disabledboolNofalseDisables the switch.
actionstringNoAction emitted on toggle.

Event: element fields + checked (bool).

[[ui.sections.contents]]
type = "switch"
id = "dry_run_switch"
label = "Dry run"
description = "List files without deleting them."
checked = true
action = "cleaner.set_dry_run"

checkbox​

A checkbox with a label.

FieldTypeRequiredDefaultMeaning
labelstringYesLabel text.
descriptionstringNoMuted helper text under the label.
checkedboolNofalseInitial state.
disabledboolNofalseDisables the checkbox.
actionstringNoAction emitted on toggle.

Event: element fields + checked (bool). Pairs naturally with an append_remove step using from = "event.checked".

[[ui.sections.contents]]
type = "checkbox"
id = "threat_ransomware_cb"
label = "Ransomware"
checked = false
action = "scanner.set_threat_ransomware"

file_select_button​

Opens the native file or folder picker. Several items can be picked at once.

FieldTypeRequiredDefaultMeaning
namestringNoSelect fileButton label.
accept_directoryboolNofalsetrue picks folders, false picks files.
acceptstringNoComma-separated extension filter for files, e.g. ".toml,.json" (leading dots optional).
disabledboolNofalseDisables the button.
actionstringNoAction emitted for each picked path.

Event: emitted once per picked path: { value = <absolute path>, append = true }. Use it with append_remove and from = "event.append" to add paths to a store array.

[[ui.sections.contents]]
type = "file_select_button"
id = "select_folder_bt"
name = "Select folder"
accept_directory = true
action = "scanner.select_folder"

file_select​

A read-only text field with a Browse button, using the webview's file input. It only returns the file name, not its path, so prefer file_select_button whenever your backend needs to open the file.

FieldTypeRequiredDefaultMeaning
namestringNoLabel above the field.
placeholderstringNoNo file selectedShown in the field when bind resolves to nothing.
button_labelstringNoBrowseLabel of the button.
acceptstringNoHTML accept filter, e.g. ".toml,.json".
bindstringNoTop-level store key whose value is shown in the field. Dotted paths and the store. prefix are not supported.
disabledboolNofalseDisables the field and button.
actionstringNoAction emitted after a file is picked.

Event: { source = <id>, type = "file_select", value = <file name>, name = <file name>, file, files }

[[ui.sections.contents]]
type = "file_select"
id = "config_picker"
name = "Configuration file"
button_label = "Browse"
accept = ".toml,.json"
action = "file.selected"

table​

Renders rows from a store array (or from static rows). Every row starts with a selection checkbox; ticking or unticking it emits the action.

FieldTypeRequiredDefaultMeaning
columnsarray of column tablesYesColumn definitions (see below).
fromstringNoStore path of an array of objects, e.g. store.q_list.items. Takes precedence over rows.
rowsarray of tablesNo[]Static rows, used when from is not set or resolves to nothing.
actionstringNoAction emitted when a row checkbox changes.

Each column:

KeyTypeRequiredDefaultMeaning
keystringYesField of the row object to display.
labelstringYesColumn header.
hideboolNofalseDon't display this column (it can still be transmitted).
transmitboolNofalseInclude this column's value in the event.

Event: { value = [<values of transmit columns, in column order>], checked = <bool> }. value is always an array (empty if no column has transmit = true). With exactly one transmit column, value = "{{event.value}}" in an append_remove step yields that single value as a string.

[[ui.sections.contents]]
type = "table"
id = "quarantine_table"
from = "store.q_list.quarantined_items"
columns = [
{ "key" = "quarantined_at", "label" = "Quarantined at" },
{ "key" = "original_path", "label" = "Name" },
{ "key" = "quarantine_name", "label" = "File", "hide" = true, "transmit" = true },
]
action = "scanner.quarantine_table_select"

tabs​

Tabs inside a section, each with its own children. Not to be confused with the plugin-level [plugin].tabs.

FieldTypeRequiredDefaultMeaning
tabsarray of tab tablesYesTabs, each with label (string), value (string, unique) and optional children (elements).
valuestringNofirst tab's valueInitially active tab.
actionstringNoAction emitted when the active tab changes.

Event: element fields + value (the new tab's value).

[[ui.sections.contents]]
type = "tabs"
id = "threat_views"
value = "active"
action = "threats.view_changed"

[[ui.sections.contents.tabs]]
label = "Active"
value = "active"

[[ui.sections.contents.tabs.children]]
type = "text"
id = "active_hint"
name = "Threats found during the last scan."

[[ui.sections.contents.tabs]]
label = "Resolved"
value = "resolved"

Layout elements​

All three render their children in order and pass actions through. Remember that they do not pass the store down (see limitations).

row​

Lays children out horizontally.

FieldTypeRequiredDefaultMeaning
childrenarray of elementsNoChild elements.
gapstringNomdSee Gap scale.
alignstringNostretchCross-axis alignment: start, center, end, stretch
justifystringNostartstart, center, end, space-between, space-around. Other values (e.g. flex-end) fall back to start.
wrapboolNofalseWrap children onto several lines.
[[ui.sections.contents]]
type = "row"
id = "scan_bt_row"
gap = "sm"
align = "center"

[[ui.sections.contents.children]]
type = "button"
id = "run_scan_bt"
name = "Run scan"
action = "scanner.run_scan"

column​

Lays children out vertically. Same fields as row except wrap.

FieldTypeRequiredDefaultMeaning
childrenarray of elementsNoChild elements.
gapstringNomdSee Gap scale.
alignstringNostretchstart, center, end, stretch
justifystringNostartstart, center, end, space-between, space-around
[[ui.sections.contents.children]]
type = "column"
id = "threat_types_column"
gap = "md"

[[ui.sections.contents.children.children]]
type = "text"
id = "threat_types_title"
name = "Threat types"
variant = "subtitle"

group​

A vertical stack with an optional heading.

FieldTypeRequiredDefaultMeaning
childrenarray of elementsNoChild elements.
titlestringNoHeading shown above the children.
descriptionstringNoMuted text under the title.
gapstringNomdSee Gap scale.
[[ui.sections.contents]]
type = "group"
id = "scan_options"
title = "Scan options"
description = "Applied to the next scan."
gap = "sm"

[[ui.sections.contents.children]]
type = "checkbox"
id = "archive_cb"
label = "Include archived files"
action = "scanner.set_archive"

Plugin-specific types​

The renderer also knows a few types prefixed with scanner_, cleaner_ and nmap_. They exist only for Griffon's first-party plugins, are being replaced by the generic components above, and must not be used by new plugins.

Conventions​

  • Action names: namespace them by plugin and describe intent, e.g. scanner.run_scan, scanner.set_archive. Avoid implementation names like runScanV2.
  • Ids: lowercase snake_case, unique across the manifest, with a short type suffix for clarity (run_scan_bt, threads_select, quarantine_table).
  • Layout: column for vertical flow, row for action bars and inline controls, group for a titled block, divider to separate blocks.
  • Keep the manifest presentational: the UI only emits actions and shows store values; all logic belongs in interactions and your Rust backend.