SettingsPanel

July 6, 2026 · View on GitHub

Card-shaped container for a group of related settings. Header at the top, then a column of <kp-settings-row>s — each row has a title + description on the left and a control on the right.

Contract

<kp-settings-panel> is a layout shell with an optional bordered card and an optional header. Drop <kp-settings-row> children inside; each row is a slot for one Toggle / Select / Input / Button / Badge / anything else you want.

Use one panel per topical group (Notifications / Privacy / Billing). Panels stack vertically on a settings page with a breathable gap between them.

API

KpSettingsPanelComponent

InputTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Header padding + type scale
titlestring'Settings group'Header title
descriptionstring''Subtitle under the title
showHeaderbooleantrueRender the card header at all
showDescriptionbooleantrueHide subtitle even if description is set
showOuterBorderbooleantrueRender the bordered card outline

KpSettingsRowComponent

InputTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Row padding + gap + type scale (must match the panel)
titlestring'Setting name'Required label
descriptionstring''Subtitle shown under the title
showDescriptionbooleantrueHide subtitle even if description is set
showDividerbooleantrueBottom border — turn off on the last row of a panel

Slot: default <ng-content> — the right-side control. Goes flush right.

Do / Don't

Do

  • Match the panel's size on every row inside it. Mixing sm/md/lg looks bumpy.
  • Turn off showDivider on the last row — the bordered panel already provides a visual close.
  • Use Badges for read-only state ("Pro", "Enabled", "Trial — 6 days left") and Buttons for actions ("Manage", "Delete"). Toggles are for booleans, Selects for enums.
  • Stack multiple panels vertically with a 24-32px gap for a clean settings page.

Don't

  • Don't render >7 rows in one panel. Split into two panels with a clear topic for each.
  • Don't put two controls in one row (e.g., Toggle + "Configure…" button). Make a child panel or open a dialog instead — the row pattern is one decision per line.
  • Don't use SettingsPanel for fields that need validation (email, URL, complex inputs). Use FormSection for those.

References

Changelog

  • 0.1.0 — Initial release. SettingsPanel + SettingsRow components, three sizes, bordered/borderless modes, control-agnostic right slot.