pub enum ScreenProp {
Show 21 variants
Title(Option<Arc<str>>),
HeaderVisible(bool),
HidesBottomBarWhenPushed(bool),
HeaderLargeTitle(bool),
HeaderTransparent(bool),
HeaderShadowVisible(bool),
HeaderTitleAlign(HeaderTitleAlign),
HeaderBackgroundOnScroll(bool),
HeaderBackTitle(Option<Arc<str>>),
HeaderRightSystemItem(Option<HeaderSystemItem>),
HeaderLeftSystemItem(Option<HeaderSystemItem>),
HeaderRightSymbol(Option<Arc<str>>),
HeaderLeftSymbol(Option<Arc<str>>),
HeaderRightItems(Vec<HeaderItem>),
HeaderLeftItems(Vec<HeaderItem>),
HeaderBackVisible(bool),
PopOnSwipe(bool),
PopOnBack(bool),
Animation(ScreenAnimation),
StatusBar(Option<StatusBarSetting>),
Orientations(u8),
}Expand description
A screen option (<NavPage title headerVisible ...>).
Variants§
Title(Option<Arc<str>>)
title: the header’s title (iOS and Android: the system header;
ignored on the desktops and the web, which show the app’s header).
HeaderVisible(bool)
headerVisible: the system header shows (default true; iOS and
Android).
HidesBottomBarWhenPushed(bool)
hidesBottomBarWhenPushed: the system tab bar leaves while this page
is on top, moving with the transition (iOS and Android).
HeaderLargeTitle(bool)
headerLargeTitle (iOS: the system header; ignored elsewhere): a
large title; the content scrolls under the header.
HeaderTransparent(bool)
headerTransparent: the content extends under the system header
(iOS and Android).
HeaderShadowVisible(bool)
headerShadowVisible (iOS: the system header; Android’s has none):
the hairline under the header. Off, the bar has no shadow line, as
iOS 26’s own bars.
HeaderTitleAlign(HeaderTitleAlign)
headerTitleAlign (Android: the system header): where the title
sits, "left" (the default) or "center". iOS’s system bar always
centers the title and ignores the value; the desktops and the web
draw no native header.
HeaderBackgroundOnScroll(bool)
headerBackgroundOnScroll (iOS: the system header; ignored
elsewhere): with headerTransparent, the header stays clear while
the content rests at its top and shows its background once the
content scrolls under it, as UIKit’s own bars do.
HeaderBackTitle(Option<Arc<str>>)
headerBackTitle (iOS: the system header; ignored elsewhere): the
label of the back button leading back to this page.
HeaderRightSystemItem(Option<HeaderSystemItem>)
ios={{ headerRightSystemItem }}: UIKit’s own bar button in the
system header’s trailing slot, in place of the view of
headerRight; a press on it is a press on the first pressable view
of headerRight. Without a headerRight, nothing is drawn there.
HeaderLeftSystemItem(Option<HeaderSystemItem>)
ios={{ headerLeftSystemItem }}: as headerRightSystemItem, in the
leading slot, pressing the first pressable view of headerLeft.
HeaderRightSymbol(Option<Arc<str>>)
ios={{ headerRightSymbol }}: UIKit’s own bar button showing the SF
Symbol of that name ("slider.horizontal.3") in the trailing slot,
in place of the view of headerRight; a press on it is a press on
the first pressable view of headerRight. headerRightSystemItem
wins over it; an unknown name draws the view of headerRight.
HeaderLeftSymbol(Option<Arc<str>>)
ios={{ headerLeftSymbol }}: as headerRightSymbol, in the leading
slot, pressing the first pressable view of headerLeft.
HeaderRightItems(Vec<HeaderItem>)
ios={{ headerRightItems }}: the trailing UIKit bar buttons, first
at the trailing edge; a non-empty list wins over
headerRightSystemItem / headerRightSymbol and leaves
headerRight’s views out of the iOS bar (they stay the fallback on
other platforms). An empty list is unset. A press without a menu,
or a menu action, reports the root’s onMenu with the item’s id
(its onPress / onSelect).
HeaderLeftItems(Vec<HeaderItem>)
ios={{ headerLeftItems }}: as headerRightItems, the leading
UIKit bar buttons, first at the leading edge, after the back button
when one shows; a non-empty list wins over headerLeftSystemItem /
headerLeftSymbol and leaves headerLeft’s views out of the iOS
bar.
HeaderBackVisible(bool)
headerBackVisible: the system header’s back button shows (default
true; iOS and Android).
PopOnSwipe(bool)
popOnSwipe: the interactive back gesture pops (iOS swipe back,
Android predictive back following the finger); the back buttons pop
either way (default true).
PopOnBack(bool)
popOnBack: the user leaves the page with the back buttons (header,
Android back, the desktops’ back keys and mouse button, the
browser’s back) and the swipe back (default true). False keeps it,
e.g. to confirm discarding changes in onBackPress (called on every
back press) and then pop(). Decided natively when the system asks,
so set it before the user acts.
Animation(ScreenAnimation)
animation: how the page enters and leaves.
StatusBar(Option<StatusBarSetting>)
statusBar: what the status bar shows while the page or dialog is
up (iOS and Android; ignored on the desktops and the web), as a view
controller’s preferredStatusBarStyle decides it on iOS. The most
recently shown page or dialog wins, field by field, over the pages
below it and over the app’s default (nsh.json statusBar). Pages
and dialogs share it.
Orientations(u8)
ios={{ supportedOrientations }} / android={{ supportedOrientations }}:
the orientations the screen may take while the page is shown
(default: the app’s). Of the pages in the tree and displayed (not
under display: none, as a tab not shown is), the most recently
shown one with a setting decides; the core sends the result as
Command::Orientations.
Trait Implementations§
Source§impl Clone for ScreenProp
impl Clone for ScreenProp
Source§impl Debug for ScreenProp
impl Debug for ScreenProp
Source§impl HostProps for ScreenProp
impl HostProps for ScreenProp
Source§fn decode<I: HostInput>(
name: &str,
input: &I,
cx: &mut HostCx,
) -> Option<Option<Self>>
fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>
name sets with input: None for a name that is
not one of these props, Some(None) when nothing is to be set.