New in
2.4.0.When to use this
- An
appearanceoption has no visible effect on the sheet. - You need to know when the sheet turns dark, or how it fits a phone and a desktop.
- Your
headlineorsubheadlinedoesn’t appear, or the sheet isn’t the one you expected.
Which sheet draws
The built-in sheet for each
useCase:
Your appearance options
A served variant brings its own layout and colors, and reads four of yourappearance color options, plus sheet (below). Three of the colors apply wherever the
variant uses the matching theme color, and a color the variant fixes for itself stays as
designed.
appearance contract: Advanced UI.
The reward sheet overrides in
appearance (the slot fields and the dot colors) and the
statusIcon option style the
built-in sheets only, never a served variant.
To give a served variant your fonts, colors, corners, and images per component, use
appearance.sheet: see Sheet Appearance.
Your copy options
Theheadline and subheadline options on
placement() apply to the built-in
sheets, and to a served variant wherever it shows your headline. A variant with fixed copy
keeps it.
Dark mode
A served variant renders in light, dark, or automatic appearance, following the appearance mode Encore sets for your app. To change it for a web app, contact Encore.
The SDK picks light or dark when the sheet opens, and an open sheet keeps it. A hex
backgroundColor sets the palette in either mode.
A page declares dark support with a color-scheme that includes dark, set in a meta tag or
in CSS on the root or body element:
Screen size
- Narrower than 768px: a full-screen variant fills the screen. A variant made for part of the screen opens as a bottom sheet. The user can drag it between its heights, or down to close it, the same as the close button.
- 768px wide or wider: a full-screen variant draws in a square of up to 720px, smaller in a short or narrow window, on a backdrop in the variant’s canvas color, not a dimmed page. A variant made for part of the screen keeps the square’s width and takes the height of its content, and keeps the square when its content doesn’t fit.
Related
placement(): the options a presentation takes.- Advanced UI: the full
appearancecontract. - The Claim Flow: what happens when the user claims.