Setting row

A setting row puts the name and one-sentence help on the left and the control on the right. Stack rows under a section heading for a settings page.

Previewapps/web/components/ui/KbSettingRow.tsx

With a badge

Require an API key to start the widgetRecommended
Visitors on pages without a key never see the widget.
Show code
<KbSettingRow title="Require an API key to start the widget" help="..." badge={<KbLozenge tone="gold">Recommended</KbLozenge>}>
  {({ titleId }) => <KbSwitch checked={on} onChange={setOn} labelledBy={titleId} />}
</KbSettingRow>

When it cannot be used yet

Require an API key to start the widgetRecommended
Visitors on pages without a key never see the widget.
Turn on API key authentication first.
Show code
<KbSettingRow ... note="Turn on API key authentication first.">