Skip to content
duxt

Field

One parameter, property or option, with its type and default.

The most-used component a documentation theme is missing: one API parameter, with more explanation than a table row holds.

Usage

showRepoboolean = false

Force a repository segment even with a single repository.

API

Props

PropTypeDefaultNotes
namestringThe parameter's name, in mono
typestringDrawn beside it, in mono
defaultstringRight-aligned, as = value
requiredbooleanfalseDraws a badge instead of a default

Slots

SlotWhat goes in it
defaultThe description, as Markdown

Notes

A definition list would be the semantic choice and is the wrong one here: the name, the type, the default and whether it is required are four different things, and <dt> gives them one slot between them.

A table stays the better choice for a long list of one-line fields — see Sources, where eight fields are meant to be compared at a glance rather than read one by one.

Was this page helpful?