Components/Settings

Settings

A settings center with sectioned navigation and rows that save as you go.

Since 0.6.0BETA

This component doc is in progress

This page is still being migrated. Demos and API details may change.

Usage

Sectioned settings

Change anything and the header goes from Saving… to Saved.

Loading demo...

Overview

Tuff's settings center: every change saves on its own, so the header shows a save status instead of a Save button.

  • A change shows Saving… in the header, then Saved · just now once 600 ms pass without another change.
  • The summon shortcut is recordable: a combination must include ⌘, ⌃, or ⌥; Esc or clicking away cancels.
  • The Shortcuts page filters and toggles each shortcut; the API key on AI models is masked (a sample value).
  • Reset, clearing clipboard history, and signing out of other devices all confirm first.
  • It plays once in view and stops at any interaction; reduced motion shows the final state and turns off the tab animation.
  • Wide (≥ 960px) adds the live preview; narrow (< 640px) moves the navigation to the top and puts each control under its label.

Customization

  • For real storage, replace the timer in watch(settings) with a debounced write; on failure, set the status to Not saved and offer a retry.
  • Give a new section's TxTabItem a stable English name and put the label in the #name slot, so a language switch keeps the current section.
  • TxTabs unmounts panels you leave: keep values out of the row components, and hold your own copy of an avatar's object URL.
  • Keep TxGroupBlock at collapsible=false (its gsap-driven expand has no reduced-motion fallback), and leave out memoryName, which writes to localStorage.
  • Put sensitive fields in a group's body, not a 56px row; TxFlatSelect opens in place without teleporting, so keep it clear of clipping scroll containers.
RegionComponentsRole
NavigationTxTabs / TxTabItemGroup / TxTabItemGrouped section navigation
HeaderTxTabHeader from TxTabs, TxStatusBadge, TxButtonSection title, save status, Reset
Setting rowsTxGroupBlock / TxBlockSlot / TxBlockLineOpen groups of setting rows
General and CoreBoxTuffSwitch, TxFlatSelect, TxFlatRadio, TxSlider, TxSelect, TxSegmentedSlider, TxNumberInput, TxInput, TxKbdAppearance, shortcut, and result settings
ShortcutsTxSearchInput, TxKbd, TuffSwitch, TxSearchEmptyFilterable shortcuts with switches
AI and privacyTxAlert, TxSensitiveInput, TxCheckbox, TxRadioGroup / TxRadioProvider, key, and privacy options
AccountTxAvatar, TxImageUploaderAvatar, name, email, and plan
ConfirmationsTxModal, TxCheckboxConfirmations before destructive actions
Live preview (wide)TxIconChip, a hand-built miniature CoreBoxMiniature CoreBox preview