Playground GitHub npm

Settings

Tabbed settings panel (Account / Notifications). Composed block.

block block

Preview

Installation

npx slintcn@latest add settings

Usage

import { Settings } from "slintcn/blocks/settings.slint";

Settings {
    display-name <=> name;
    email <=> email;
    save => { /* … */ }
}

Properties

tab in-out int

Two-way; active tab (0 = Account, 1 = Notifications).

display-name in-out string

Two-way bound to the name field.

email in-out string

Two-way bound to the email field.

notify-product in-out bool

Two-way; product-news email toggle.

notify-security in-out bool

Two-way; security-alert email toggle.

save callback ()

Fired on the Save button.

Dependencies

cardtabsinputlabelswitchbutton

Installed automatically as transitive dependencies of slintcn add settings.