ThemeSettings <pm-theme-settings>
Display settings for the people using your app: colour mode, theme, surface, corners, density, text size, motion and theme transition.
Overview
It has a Reset button. Put it in a drawer or on a settings page.
On its own it sets the attributes on <html> and saves the choices where the no-flash script and ThemeController read them, so they apply before the first paint on the next visit. Give it a controller (a ThemeController) to drive that instead, with its view transitions, in sync with the rest of your app.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
themes | string | — | Theme names to offer (comma separated), besides the default one. Without it there is no theme choice. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-change | onPmChange | A setting changed (key, and value, or null for the default). |
Methods
set(), reset()
Used in templates
Overview dashboardTraffic analyticsOrdersCustomer 360InboxTeam chatAI assistantNotificationsProject boardTeam and rolesBilling and invoicesUser profileAccount settingsSign inCreate accountTwo-step verificationForgot passwordChoose a new passwordPricing plansProduct pageShopping cartCheckoutLanding pageArticleChangelogHelp centreContactComing soonNot found (404)Server error (500)Onboarding wizardAppointment bookingFeedback survey