Catalogue examples

Start with a working example, then check the generated contract for every setting, event, and child rule.

The catalogue

Every element an app may draw, with its settings and what each takes. A screen draws these and nothing else: there is no HTML, no styling and no colour of your own — Brydio draws them in its own theme, light and dark, so an app looks like the rest of the product without trying to.

This page is generated from the catalogue itself by bun run docs:elements. Adding an element or a setting and not running it fails packages/cli/test/elements-doc.test.ts, so the reference cannot fall behind the code. Do not edit it by hand.

A setting the element does not declare is refused, as is a value outside what it takes; brydio validate catches both before you publish, with the codes in the publish checklist.

There are 28 elements.

bry-stack

Holds other elements or text.

SettingTakesNeeded
directionrow, columnno
gap1, 2, 3, 4, 5, 6, 7, 8no
alignstart, center, end, stretchno
justifystart, center, end, betweenno
wraptrue or falseno

Tells the app nothing.

bry-heading

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
levela whole number from 1 to 4no
texttext, at most 200 charactersyes
varianttitle, heading, subheading, labelno

Tells the app nothing.

bry-text

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
texttext, at most 4,000 charactersyes
tonedefault, muted, neutral, brand, success, warn, dangerno
variantbody, ui, caption, labelno
sizesm, mdno

Tells the app nothing.

bry-button

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
labeltext, at most 200 charactersyes
variantprimary, secondary, ghost, dangerno
sizesm, mdno
disabledtrue or falseno
workingtrue or falseno
iconadd, archive, calendar, check, copy, dismiss, docs, info, mail, members, notes, pin, rename, retry, search, settings, tasks, trash, more, close, arrowRight, chevronRight, chevronDown, chevronUpno
hideLabeltrue or falseno

Tells the app: press.

bry-card

Holds other elements or text.

SettingTakesNeeded
titletext, at most 200 charactersno
padding2, 3, 4, 5, 6no
pressabletrue or falseno
loadingtrue or falseno

Tells the app: press.

bry-input

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
valuetext, at most 1,000 charactersno
placeholdertext, at most 200 charactersno
labeltext, at most 200 charactersno
kindtext, email, url, searchno
maxLengtha whole number from 1 to 1000no
requiredtrue or falseno
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change, submit.

bry-textarea

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
valuetext, at most 4,000 charactersno
placeholdertext, at most 200 charactersno
labeltext, at most 200 charactersno
maxLengtha whole number from 1 to 4000no
requiredtrue or falseno
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change.

bry-select

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
valuetext, at most 200 charactersno
optionsat most 100 { value, label } choicesyes
placeholdertext, at most 200 charactersno
labeltext, at most 200 charactersno
sizesm, mdno
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change.

bry-label

Holds other elements or text.

SettingTakesNeeded
texttext, at most 200 charactersyes
requiredtrue or falseno

Tells the app nothing.

bry-grid

Holds other elements or text.

SettingTakesNeeded
columns1, 2, 3, 4, 5, 6no
gap1, 2, 3, 4, 5, 6, 7, 8no
alignstart, center, end, stretchno

Tells the app nothing.

bry-badge

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
texttext, at most 200 charactersyes
toneneutral, brand, success, warn, dangerno

Tells the app nothing.

bry-avatar

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
nametext, at most 200 charactersyes
sizesm, md, lgno

Tells the app nothing.

bry-list-row

Holds other elements or text.

SettingTakesNeeded
titletext, at most 200 charactersno
descriptiontext, at most 200 charactersno
metatext, at most 200 charactersno
pressabletrue or falseno
selectedtrue or falseno
loadingtrue or falseno

Tells the app: press.

bry-empty-state

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
titletext, at most 200 charactersyes
texttext, at most 4,000 charactersno
actiontext, at most 200 charactersno

Tells the app: action.

bry-skeleton

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
shapeline, block, rowno
counta whole number from 1 to 12no

Tells the app nothing.

bry-table

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
columnsa list of at most 12: a record of key, heading, align, sortable (needs key, heading)yes
rowsa list of at most 500: a record of id, cells (needs id, cells)no
sorta record of key, direction (needs key, direction)no
labeltext, at most 200 charactersno
selectabletrue or falseno
selectedtext, at most 128 charactersno
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: sort, select.

bry-virtual-list

Holds other elements or text.

SettingTakesNeeded
counta whole number from 0 to 1000000yes
starta whole number from 0 to 1000000no
rowSizesm, md, lgno
labeltext, at most 200 charactersno
selectabletrue or falseno
selecteda whole number from 0 to 1000000no
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: range, select.

bry-dialog

Holds other elements or text.

SettingTakesNeeded
opentrue or falseno
titletext, at most 200 charactersyes
descriptiontext, at most 4,000 charactersno
actionsa list of at most 3: a record of id, label, tone, disabled (needs id, label)no
canceltext, at most 200 charactersno

Tells the app: action, close.

bry-menu

Holds other elements or text.

SettingTakesNeeded
itemsa list of at most 20: a record of id, label, icon, tone, separator, disabled (needs id, label)yes

Tells the app: select.

bry-date

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
valuetext, at most 10 charactersno
mintext, at most 10 charactersno
maxtext, at most 10 charactersno
labeltext, at most 200 charactersno
placeholdertext, at most 200 charactersno
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change.

bry-split

Holds other elements or text.

SettingTakesNeeded
ratioa whole number from 20 to 80no
labeltext, at most 200 charactersno

Tells the app nothing.

bry-checkbox

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
checkedtrue or falseno
labeltext, at most 200 charactersyes
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change.

bry-switch

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
checkedtrue or falseno
labeltext, at most 200 charactersyes
disabledtrue or falseno
errortext, at most 200 charactersno

Tells the app: change.

bry-board

Holds other elements or text.

SettingTakesNeeded
labeltext, at most 200 charactersno
cardSizesm, md, lgno
settledtext, at most 128 charactersno
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: move.

bry-board-column

Holds other elements or text.

SettingTakesNeeded
titletext, at most 200 charactersyes
counta whole number from 0 to 100000no
limita whole number from 1 to 100000no
starta whole number from 0 to 100000no
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: range.

bry-markdown

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
texttext, at most 50,000 charactersyes
expandedtrue or falseno

Tells the app nothing.

bry-diff

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
filesa list of at most 300: a record of path, previous, status, patch (needs path)yes
labeltext, at most 200 charactersno
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: expand, select.

bry-file-grid

Holds nothing: it is drawn from its settings alone.

SettingTakesNeeded
labeltext, at most 200 charactersno
counta whole number from 0 to 100000yes
starta whole number from 0 to 100000no
filesa list of at most 200: a record of id, name, kind, preview, size, modified (needs id, name, kind)no
tileSizesm, md, lgno
selectabletrue or falseno
selecteda list of at most 200: text, at most 128 charactersno
menua list of at most 12: a record of id, label, icon, tone (needs id, label)no
loadingtrue or falseno
emptytext, at most 200 charactersno

Tells the app: open, select, menu, range.