Inputs
SettingItem
A settings row with a label, a description and one control on the right.
<script>
import { SettingItem, Switch } from "@codeatlasdev/ui";
let email = $state(true);
</script>
<SettingItem label="Email notifications" description="Receive an email for every mention.">
<Switch bind:checked={email} />
</SettingItem>
The row is a <label>, so clicking the text activates the first control inside it (a Switch, an input, a select or a button) and names it for assistive technology. Use it inside AppSettings tabs.
Switch rows
Reference #044 · Pick in the gallery
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | – | Setting name. Required. |
description | string | – | Help text under the label. |
children | Snippet | – | The control, placed on the right. |
class | string | '' | Extra classes on the root. |