Fields

Document API fields, SDK options, and component attributes.

classDefault "Barbarian"
"Barbarian" | "Necromancer" | "Sorcerer"
Who can equip it. Everyone else may admire it angrily.
damageRequired
[min: number, max: number]
Minimum and maximum damage per hit. The number you quote to your friends is always the maximum.
legendaryAffixDefault "Inventory Management"
string
Critical hits sort your inventory. Somehow, there is still no room.

Usage#

Wrap related Field components in Fields to separate them with dividers. Write each description as Markdown below its attributes.

A Field also works on its own. Descriptions can contain paragraphs, links, lists, and code blocks.

Required fields and defaults#

Set required=true to show Required. Otherwise, supply defaultValue to show Default followed by the value. Required takes precedence if both are supplied.

Type highlighting#

Set language to the language of the type expression and default value, such as typescript or python. Both are highlighted during compilation using the same palette as code blocks. The text remains unchanged when copied.

Field Reference#

nameRequired
string

Field name..

typeDefault undefined
string

Type expression displayed below the name.

languageDefault undefined
string

Language used to highlight the type and default value. Omit for plain text; unknown languages also render as plain text.

requiredDefault undefined
boolean

Show Required when true. Otherwise show the default value when supplied.

defaultValueDefault undefined
string

Default value as literal display text, including any quotes..