pub struct ScreenConfig {Show 27 fields
pub title: Option<Arc<str>>,
pub header_visible: bool,
pub large_title: bool,
pub header_transparent: bool,
pub header_shadow_visible: bool,
pub title_align: HeaderTitleAlign,
pub header_background_on_scroll: bool,
pub hides_bottom_bar_when_pushed: bool,
pub tint_color: Option<Color>,
pub background_color: Option<Color>,
pub title_color: Option<Color>,
pub back_title: Option<Arc<str>>,
pub back_visible: bool,
pub gesture_enabled: bool,
pub prevent_back: bool,
pub animation: ScreenAnimation,
pub left: Option<NodeId>,
pub right: Option<NodeId>,
pub right_system_item: Option<HeaderSystemItem>,
pub right_symbol: Option<Arc<str>>,
pub left_system_item: Option<HeaderSystemItem>,
pub left_symbol: Option<Arc<str>>,
pub right_items: Vec<HeaderItem>,
pub left_items: Vec<HeaderItem>,
pub title_view: Option<NodeId>,
pub header_view: Option<NodeId>,
pub header_height: Points,
}Expand description
Options of a screen: its header and transitions.
The header options are the native header’s (iOS, Android); a platform
without one (NO_NATIVE_HEADER) reads only header_view,
header_height, prevent_back, gesture_enabled and animation.
Fields§
§title: Option<Arc<str>>Title in the header.
header_visible: boolShow the native header.
large_title: boolLarge title (iOS; the content scrolls under the header).
header_transparent: boolThe content extends under the header.
header_shadow_visible: boolThe hairline under the header (iOS).
title_align: HeaderTitleAlignWhere the title sits (Android; iOS’s system bar always centers it and ignores this).
header_background_on_scroll: boolA transparent header shows its background once the content scrolls under it (iOS).
hides_bottom_bar_when_pushed: boolThe system tab bar leaves while this page is on top.
tint_color: Option<Color>Color of the back button and bar buttons.
background_color: Option<Color>Header background.
title_color: Option<Color>Title color.
back_title: Option<Arc<str>>Label of the back button leading back to this screen.
back_visible: boolShow the back button.
gesture_enabled: boolThe interactive back gesture (iOS swipe back, Android predictive back
following the finger) is on; the back button pops either way
(popOnSwipe).
prevent_back: boolThe user cannot leave the screen (popOnBack false: no swipe, the
back buttons do not pop): answered by the platform when the system
asks, without JS. Every back press sends
crate::EventKind::BackRequest either way.
animation: ScreenAnimationPush / pop transition.
left: Option<NodeId>Leading header item view.
right: Option<NodeId>Trailing header item view.
right_system_item: Option<HeaderSystemItem>UIKit’s own bar button in the trailing slot instead of right’s
view (iOS); a press on it presses right’s first pressable view.
right_symbol: Option<Arc<str>>UIKit’s own bar button showing this SF Symbol in the trailing slot
instead of right’s view (iOS); right_system_item wins over it.
left_system_item: Option<HeaderSystemItem>As right_system_item, in the leading slot, pressing left.
left_symbol: Option<Arc<str>>As right_symbol, in the leading slot, pressing left.
right_items: Vec<HeaderItem>Trailing UIKit bar buttons (ios={{ headerRightItems }}); a
non-empty list wins over right_system_item / right_symbol and
leaves right’s view out of the iOS bar. Empty is unset.
left_items: Vec<HeaderItem>As right_items, the leading bar buttons (ios={{ headerLeftItems }}), over left_system_item / left_symbol and left’s view.
title_view: Option<NodeId>Custom title view.
header_view: Option<NodeId>The app’s header (header): on a platform without a native header
(NO_NATIVE_HEADER), a view at the top of the screen whose frame
the core sets (as wide as the screen, as tall as it lays out),
above the content.
header_height: PointsHeight of the header area at the top of the screen, as the core laid
the content out below it: the native header’s (status bar included),
or the header view’s without a native header.