Skip to main content

Prop

Enum Prop 

Source
pub enum Prop {
Show 138 variants Component(Arc<str>), ComponentSlot(Arc<str>), ComponentRender(Arc<str>), ComponentProp(Arc<str>, Option<JsonValue>), ComponentPropBinding(Arc<str>, Option<NodeId>), RustProp(&'static str, Option<AnyValue>), ShaderSource(Option<Arc<str>>), Shader(Option<Shader>), GpuRenderer(Option<GpuSource>), Follow(Option<FollowTarget>), FollowTransition(Option<LayoutTransition>), Uniforms(ShaderUniforms), ShaderPaused(bool), ShaderProgress(ShaderProgress), MaxSampleOffset(Points), TransitionValue(Option<TransitionKey>), TransitionDuration(Option<f32>), TransitionFallback(TransitionFallback), TransitionShader(Option<NavShaderSpec>), Source(Option<ImageSource>), Horizontal(bool), Scroll(ScrollProp), Scrollbar(ScrollbarSetting), Refreshing(bool), Count(u32), EstimatedItemSize(Points), Slot(CellSlot), Columns(u32), Splice(u32, u32, u32), ListDiff(Rc<ListDiff>), Inverted(bool), FollowEnd(Option<Points>, bool), ListAlignment(ListAlignment), StickyIndices(Vec<u32>), StickyOffset(Points), StickyOffsetNode(Option<NodeId>), ListViewport(ListViewport), ListContent(ListContentStyle), ListContentClass(Box<str>), Viewability(Viewability), LoadMoreThreshold(f32), LoadMoreAtStartThreshold(f32), CellIndex(u32), ScrollValue(Option<NodeId>), PullValue(Option<NodeId>), PanValues(Option<NodeId>, Option<NodeId>), Value(String), DefaultValue(String), Placeholder(String), PlaceholderColor(Option<Color>), Secure(bool), KeyboardType(KeyboardType), KeyboardAppearance(KeyboardAppearance), ReturnKeyType(ReturnKeyType), AutoCapitalize(AutoCapitalize), AutoCorrect(bool), Multiline(bool), MaxLength(Option<u32>), Readonly(bool), SubmitBehavior(Option<SubmitBehavior>), PasteBehavior(PasteBehavior), PasteMaxSize(Option<u64>), AutoFocus(bool), SelectTextOnFocus(bool), Caret(bool), InputAccessoryViewId(Option<Box<str>>), NativeId(Option<Box<str>>), SelectionColor(Option<Color>), CaretColor(Option<Color>), AutoFill(AutoFill), Selection(u32, u32), KeyboardDismissMode(KeyboardDismissMode), PointerEvents(PointerEvents), HitSlop(EdgeInsets), Href(Option<Arc<str>>), PanActivation(Option<PanActivation>), PanEnabled(bool), PanScrollHandoff(bool), ActiveStyle(Option<Rc<StylePatch>>), HoverStyle(Option<Rc<StylePatch>>), FocusStyle(Option<Rc<StylePatch>>), DisabledStyle(Option<Rc<StylePatch>>), SelectedStyle(Option<Rc<StylePatch>>), CheckedStyle(Option<Rc<StylePatch>>), IndeterminateStyle(Option<Rc<StylePatch>>), ExpandedStyle(Option<Rc<StylePatch>>), PressedStyle(Option<Rc<StylePatch>>), FocusWithinStyle(Option<Rc<StylePatch>>), FocusVisibleStyle(Option<Rc<StylePatch>>), ProjectedStates(u16), ProjectedActive(Option<&'static str>), ProjectedData(Box<[&'static str]>), HeaderStyle(Option<Rc<StylePatch>>), HeaderClass(Box<str>), HeaderClassList(Option<Rc<ClassList>>), LayoutDirection(bool), Appearance(Appearance), Keymap(Arc<Keymap>), InsetPadding(EdgeInsets), InsetMargin(EdgeInsets), Class(Box<str>), ClassList(Vec<Box<str>>), TailwindTheme(Box<str>), UiTheme(Box<str>), SnapToWindowMargin(Points), Image(ImageProp), LongPressDelay(Option<f32>), Ripple(Option<Ripple>), Elevation(Points), BackdropMaterial(BackdropMaterial), ScrollEdgeElement(Option<ScrollEdgeTarget>), MacOsBackdrop(Option<MacOsBackdrop>), WindowsBackdrop(Option<WindowsBackdrop>), Accessibility(AccessibilityProp), TestId(Option<Arc<str>>), CopyText(Option<Arc<str>>), WebElement(Option<WebElement>), WindowDrag(Option<bool>), WindowControl(Option<WindowControl>), WindowResize(Option<ResizeEdge>), Tooltip(TooltipContent), Focusable(Option<bool>), KeyCapture(KeyCapture), SelectableView(bool), SelectionMenu(Vec<MenuItem>), ContinuesText(bool), PassPosition(bool), AllowFontScaling(bool), MaxFontSizeMultiplier(f32), AdjustsFontSizeToFit(bool), MinimumFontScale(f32), PinchValue(Option<NodeId>), RotationValue(Option<NodeId>), Screen(ScreenProp), Modal(ModalProp), Overlay(OverlayProp), HeaderSlot(HeaderSlot), Native(NativeProp), // some variants omitted
}
Expand description

A non-style property of a host node.

Variants§

§

Component(Arc<str>)

component: which registered native component a <native> element is (set once, before it is mounted).

§

ComponentSlot(Arc<str>)

componentSlot: this view holds the JSX a Rust component’s host got for slot name (created by the generated glue).

§

ComponentRender(Arc<str>)

componentRender: this view holds what the app’s function of a Rust component’s render prop rendered for a key (the prop, U+001F, the key; made by the generated glue on JsEvent::Render).

§

ComponentProp(Arc<str>, Option<JsonValue>)

A property of a registered native component ($name from JS): any JSON value, None to remove it.

§

ComponentPropBinding(Arc<str>, Option<NodeId>)

A property of a registered native component bound to an animated value ($name from JS given an animated value): the platform pushes the value to the component on every frame it changes. None unbinds it; a value set with Prop::ComponentProp while bound is kept and sent once it is unbound.

§

RustProp(&'static str, Option<AnyValue>)

A prop of a Rust component’s host, decoded in the JS call into the prop’s Rust type (crate::element::PropSpec::decode); None resets it to its default.

§

ShaderSource(Option<Arc<str>>)

source (shaders): the WGSL defining fn shade(uv: vec2f) -> vec4f, the color of each point of the box (uv 0..1 from the top left; straight sRGB with alpha), which reads nsh.size, nsh.time, nsh.scale and its struct Uniforms as uniforms, and an effect’s or transition’s pictures (sample_content, sample_from, …). An effect without one draws its children as they are; a transition without one runs its fallback.

§

Shader(Option<Shader>)

A compiled shader, as Rust sets it (TS sets source).

§

GpuRenderer(Option<GpuSource>)

A GPU view’s renderer, as Rust sets it (gpu_view().renderer(…); TS names a registered one, Prop::Component); None: none.

§

Follow(Option<FollowTarget>)

The element whose frame the view’s follows along its parent’s main axis, as Rust sets it (View::follow, core/follow.rs); None follows nothing.

§

FollowTransition(Option<LayoutTransition>)

How a view that follows an element moves when it follows another one (View::follow_transition); None jumps there.

§

Uniforms(ShaderUniforms)

uniforms (shaders): the values of the members of the shader’s struct Uniforms, by name: numbers, colors, lists of them (vectors, arrays of vec4f) and animated values, which move it natively.

§

ShaderPaused(bool)

paused (shaders): its clock (nsh.time) stands still.

§

ShaderProgress(ShaderProgress)

progress (shader effects): nsh.progress, a number or an animated value, which moves it natively.

§

MaxSampleOffset(Points)

maxSampleOffset (shader effects and transitions): how far beyond the box, in points, the shader draws and its pictures reach.

§

TransitionValue(Option<TransitionKey>)

value (shader transitions): a string, number or boolean; when it changes, the transition runs (not for the first one).

§

TransitionDuration(Option<f32>)

duration (shader transitions): how long one runs, in milliseconds (300 by default).

§

TransitionFallback(TransitionFallback)

fallback (shader transitions): what runs without a source.

§

TransitionShader(Option<NavShaderSpec>)

transitionShader (pages and dialogs): { source, uniforms, duration }, a shader the page or dialog comes and goes through (the lower side sample_from, the upper sample_to) instead of its animation, for duration milliseconds (350 by default).

§

Source(Option<ImageSource>)

src: a URL, asset:/path, or an imported asset.

§

Horizontal(bool)

horizontal: scrolls sideways.

§

Scroll(ScrollProp)

Scrolling behavior of a scroll view or list.

§

Scrollbar(ScrollbarSetting)

scrollbar: the scroll indicator shows (default true), or the app’s built-in bar of a theme (an object, nsh/base’s ScrollbarTheme). A multiline input’s is its text’s.

§

Refreshing(bool)

refreshing: the pull-to-refresh spinner shows.

§

Count(u32)

Number of items of a list.

§

EstimatedItemSize(Points)

estimatedItemSize: the size of items not measured yet, in points (default 50).

§

Slot(CellSlot)

The recycling slot (or the role) of a list cell, set once by the runtime.

§

Columns(u32)

numColumns: items per row (vertical lists).

§

Splice(u32, u32, u32)

The items of a list changed: removed at at became inserted (precedes the new Count).

§

ListDiff(Rc<ListDiff>)

The items of a keyed list changed: rows kept, moved, inserted and removed, each row that stays keeping its cell (precedes the new Count). Set by the runtime’s lists.

§

Inverted(bool)

inverted: laid out from the end, item 0 last (chat style); starts scrolled to the end and keeps its distance from the end as content changes.

§

FollowEnd(Option<Points>, bool)

maintainVisibleContentPosition: with autoscrollToBottomThreshold, a list (not inverted) at the end of its content, or within that many points of it, stays at the end as the content grows or the viewport shrinks (a reply streaming into its last item); scrolled further up, it keeps the visible content where it is. Items inserted above the visible ones never move them. With animated, an end that moves away by a large step at once (a card or chart appearing in the last item) is followed by an animated scroll whose target keeps up with the end; small steps (text streaming in) follow at once as without it.

§

ListAlignment(ListAlignment)

alignment: where the list rests; bottom for a chat in reading order (an inverted list ignores it).

§

StickyIndices(Vec<u32>)

stickyHeaderIndices: items that stick to the start while scrolled past (one column, not inverted).

§

StickyOffset(Points)

stickyHeaderOffset: how far from the start of the viewport sticky items stick, as CSS position: sticky’s top (negative: partly out of view); the content scrolls under the space before them.

§

StickyOffsetNode(Option<NodeId>)

stickyHeaderOffset as an animated value: sticky items stick that far from the start of the viewport, following the value (below a header that moves); the platforms read it as they pin.

§

ListViewport(ListViewport)

viewport: "parent" lays the list out at its full length in its parent and renders the rows near the viewport of the scroll view around it, which scrolls it (a page of headers and lists); "own" (default) scrolls it in a scroll view of its own. Fixed when the list is made.

§

ListContent(ListContentStyle)

contentStyle: padding and gaps of the content.

§

ListContentClass(Box<str>)

contentClass: padding and gaps of the content as classes (p-*, gap-*); contentStyle wins over them (set by the runtime).

§

Viewability(Viewability)

viewabilityConfig: when items count as viewable.

§

LoadMoreThreshold(f32)

How close to the end onLoadMore fires, in viewports.

§

LoadMoreAtStartThreshold(f32)

How close to the start onLoadMoreAtStart fires, in viewports.

§

CellIndex(u32)

The item index a list cell now renders (set by the runtime after each bind, in the same batch as the cell’s new content).

§

ScrollValue(Option<NodeId>)

scrollValue: an animated value fed with the scroll offset (main axis), for scroll-linked effects.

§

PullValue(Option<NodeId>)

pullValue: an animated value fed with how far a vertical scroll view is pulled past its top (0 at rest, growing with the pull; the room kept above the content while it refreshes), for an app’s own pull-to-refresh indicator.

§

PanValues(Option<NodeId>, Option<NodeId>)

pan: drags drive these animated values (points) on the UI thread.

§

Value(String)

value: the text, controlled by JS.

§

DefaultValue(String)

defaultValue: the initial text.

§

Placeholder(String)

placeholder: shown while the input is empty.

§

PlaceholderColor(Option<Color>)

The placeholder’s color (Rust components; TS sets the placeholderColor style key or placeholder:text-*).

§

Secure(bool)

masked: the text is hidden (passwords).

§

KeyboardType(KeyboardType)

keyboardType: the keyboard layout.

§

KeyboardAppearance(KeyboardAppearance)

keyboardAppearance (iOS): the keyboard’s light or dark look; Android’s keyboards follow the system’s theme.

§

ReturnKeyType(ReturnKeyType)

returnKeyType: the label of the return key.

§

AutoCapitalize(AutoCapitalize)

autoCapitalize: automatic capitalization (default "sentences").

§

AutoCorrect(bool)

autoCorrect: the system’s corrections (default true).

§

Multiline(bool)

multiline: several lines; return inserts a line break.

§

MaxLength(Option<u32>)

maxLength: the most characters the user can enter, counted as Unicode code points on every platform (an emoji such as 😀 is one). A longer paste goes in cut to what fits, never inside a character such as an emoji with its skin tone.

§

Readonly(bool)

readonly: the user can select and copy the text but not change it.

§

SubmitBehavior(Option<SubmitBehavior>)

submitBehavior: what return does: "submit" (reports onSubmit, keeps the focus), "blurAndSubmit" (also unfocuses), "newline" (inserts a line break; multiline inputs only). Default: "blurAndSubmit" for one line, "newline" for several. A multiline input that submits still takes line breaks from Shift+Return or Option / Alt+Return on desktops.

§

PasteBehavior(PasteBehavior)

pasteBehavior: what a paste does: "insert" (default) inserts its text, "report" inserts nothing; onPaste reports what was pasted either way. Decided natively when the user pastes.

§

PasteMaxSize(Option<u64>)

pasteMaxSize: the largest pasted file read, in bytes; a larger one reaches onPaste in tooLarge, its name, type and size only, so the app can tell the user. Decided natively when the user pastes, before the file is read where the platform says its size. Default: every file is read.

§

AutoFocus(bool)

autoFocus: focused when it appears.

§

SelectTextOnFocus(bool)

selectTextOnFocus: the whole text is selected when the input takes the focus (a click, Tab, focus(), autoFocus). Decided natively as the focus arrives; a click that drags, extends (Shift) or selects words (double click) keeps the user’s selection.

§

Caret(bool)

caret: the caret is drawn (default true; false hides it).

§

InputAccessoryViewId(Option<Box<str>>)

inputAccessoryViewID: the nativeID of an InputAccessoryView (nsh/ios) shown over the keyboard while the input has focus.

§

NativeId(Option<Box<str>>)

nativeID: names the view for others: an input accessory’s for inputAccessoryViewID, a scroll view’s for the embedding app’s watchScroll.

§

SelectionColor(Option<Color>)

The highlight of an input’s or a selectable text’s selection (Rust components; TS sets the selectionColor style key or selection:bg-*).

§

CaretColor(Option<Color>)

An input’s caret (Rust components; TS sets the caretColor style key or caret-*).

§

AutoFill(AutoFill)

autoComplete (iOS: also textContentType): what an input holds, for autofill (React Native’s values, e.g. “username”, “current-password”, “new-password”, “one-time-code”, “email”, “tel”, “postal-code”, “cc-number”, “off”).

§

Selection(u32, u32)

selectedRange: the controlled selection (UTF-16 units; end defaults to start, a caret).

§

KeyboardDismissMode(KeyboardDismissMode)

keyboardDismissMode: whether dragging dismisses the keyboard.

§

PointerEvents(PointerEvents)

Touch handling of the view and its children (React Native semantics), which wins over the style’s pointerEvents unless auto. Set by the core (a tooltip’s overlay), never by JS.

§

HitSlop(EdgeInsets)

hitSlop: extends the touch area beyond the bounds.

§

Href(Option<Arc<str>>)

Where a link goes (nsh/base‘s Link sets its href, TextView its links’ URL on their span), carried to the platform as data: a terminal draws the text inside the view as a hyperlink to it, and a span’s is recorded in its block’s text (AttributedText::link_hrefs). Set by the link components, never by JS.

§

PanActivation(Option<PanActivation>)

panActivation: the view’s touch responder waits for a pan that the platform activates past an offset on one axis (and fails past one on the other), deciding on the main thread so the scroll views around it keep the touches until then.

§

PanEnabled(bool)

Whether native pans may start or update their bound values. Rust components use this to retain gesture state across permission changes.

§

PanScrollHandoff(bool)

A vertical pan cooperates with descendant scroll views on iOS: scrolling consumes the drag until its top, then the pan follows.

§

ActiveStyle(Option<Rc<StylePatch>>)

activeStyle: the style while pressed (and not disabled), over the view’s style; applied natively, no JS round trip.

§

HoverStyle(Option<Rc<StylePatch>>)

hoverStyle: the style while a pointer is over the view (and it is not disabled).

§

FocusStyle(Option<Rc<StylePatch>>)

focusStyle: the style while the view has focus (and is not disabled).

§

DisabledStyle(Option<Rc<StylePatch>>)

disabledStyle: the style while disabled, over every other state’s.

§

SelectedStyle(Option<Rc<StylePatch>>)

selectedStyle: the style while accessibilityState.selected (a Button’s selected), and not disabled.

§

CheckedStyle(Option<Rc<StylePatch>>)

checkedStyle: the style while accessibilityState.checked (true, not mixed: a checkbox’s, a switch’s, a radio’s), and not disabled.

§

IndeterminateStyle(Option<Rc<StylePatch>>)

indeterminateStyle: the style while accessibilityState.checked is mixed (a checkbox’s indeterminate), and not disabled.

§

ExpandedStyle(Option<Rc<StylePatch>>)

expandedStyle: the style while accessibilityState.expanded (a Popover’s or Menu’s trigger while its popup is open), and not disabled.

§

PressedStyle(Option<Rc<StylePatch>>)

pressedStyle: the style while accessibilityState.pressed (true, not mixed: a toggle button that is on), and not disabled. Not activeStyle, a press in progress.

§

FocusWithinStyle(Option<Rc<StylePatch>>)

focusWithinStyle: the style while the keyboard focus is on the view or a view inside it (an overlay’s content counting as inside the view it is in), and it is not disabled.

§

FocusVisibleStyle(Option<Rc<StylePatch>>)

focusVisibleStyle: the style while the view has focus and shows it (focus-visible:: the keyboard moved the focus there, or it is an input that edits), and it is not disabled.

§

ProjectedStates(u16)

The states a part of a control shows its classes and state styles as its control has them (crate::tailwind::state bits: checked, indeterminate, disabled): a switch’s thumb styled checked: while the switch is on. They tell screen readers nothing and take no presses away: the control announces and handles them. Set by components (Interactive::project_checked, project_indeterminate, project_disabled), never by JS.

§

ProjectedActive(Option<&'static str>)

The group whose press a part of a control shows as its own (None: none): its active: classes and active style apply while that group around it is pressed, as the platform reports the group’s press (a switch’s thumb while the switch is held). Set by components (Interactive::project_group_active), never by JS.

§

ProjectedData(Box<[&'static str]>)

The boolean data-* attributes a part of a component shows, by name without data- and sorted: its data-<name>: classes apply, and with group the group-data-<name>: classes inside it (a calendar’s day at the start of a range, data-range-start). They tell screen readers nothing. Set by components (Interactive::project_data), never by JS.

§

HeaderStyle(Option<Rc<StylePatch>>)

headerStyle of a page: backgroundColor, color (the title’s) and tintColor (the buttons’) of its header.

§

HeaderClass(Box<str>)

headerClass of a page: the header’s colors as classes (bg-*, text-*, tint-*); headerStyle wins over them.

§

HeaderClassList(Option<Rc<ClassList>>)

A page header’s colors as typed styles lowered as classes are (Rust: Screen::header_style_with), in place of headerClass; headerStyle wins over them. Set by components, never by JS.

§

LayoutDirection(bool)

The surface lays out right to left (on the root, from the user’s language).

§

Appearance(Appearance)

The app’s appearance (on the root, from nsh.json and setColorScheme).

§

Keymap(Arc<Keymap>)

The surface’s keyboard shortcuts (on the root, from nsh/keymap): the whole table, mounted as crate::MountItem::Keymap.

§

InsetPadding(EdgeInsets)

Padding added to the style’s own (safe areas, the keyboard), in points on the physical edges; set by components (Element::inset_padding), never by JS.

§

InsetMargin(EdgeInsets)

Margin added to the style’s own (an inset margin), in points on the physical edges; set by components.

§

Class(Box<str>)

class: Tailwind CSS classes ("flex-row gap-2 p-4 bg-white dark:bg-zinc-900"), resolved natively. Later classes win over earlier ones; style wins over both.

§

ClassList(Vec<Box<str>>)

classList: classes applied while their value is truthy ({ "opacity-50": busy() }).

§

TailwindTheme(Box<str>)

The app’s Tailwind theme (JSON, on the root).

§

UiTheme(Box<str>)

The theme of Rust components (nsh.json theme, JSON), on the root.

§

SnapToWindowMargin(Points)

The distance overlays without a margin keep from the window’s edges (setSnapToWindowMargin), on the root.

§

Image(ImageProp)

An image option.

§

LongPressDelay(Option<f32>)

delayLongPress: milliseconds before a press becomes a long press (default 500).

§

Ripple(Option<Ripple>)

ripple (Android): the material ripple while pressed.

§

Elevation(Points)

elevation (Android): the material shadow (points), from the view’s shape.

§

BackdropMaterial(BackdropMaterial)

The system material of a backdrop blur (iOS, default ultraThin).

§

ScrollEdgeElement(Option<ScrollEdgeTarget>)

ios={{ scrollEdgeElement }}: the scroll view the view floats over and the edge of it the view sits at (iOS 26: that scroll view’s edge effect takes its shape from the view); None: none.

§

MacOsBackdrop(Option<MacOsBackdrop>)

macos={{ backdrop }}: the NSVisualEffectView material on macOS (default popover / withinWindow / active; None: none).

§

WindowsBackdrop(Option<WindowsBackdrop>)

windows={{ backdrop }}: { material: "blur" } draws the system’s blur of what is behind a transparent window under the view, on Windows 11.

§

Accessibility(AccessibilityProp)

An accessibility property.

§

TestId(Option<Arc<str>>)

testID: an identifier for UI tests.

§

CopyText(Option<Arc<str>>)

copyText: what a copy of the text around the view gives in its place, when the view (or image) is inside a text (an inline formula’s source, an emoji image’s character): selecting across it and copying puts this there. Unset, the view adds nothing to the copy. A view outside a text and a nested text span ignore it.

§

WebElement(Option<WebElement>)

web={{ element }}: the HTML element the web draws the view or text as ("p", "nav", "article", …), for what role cannot say; the other platforms keep the view as it is.

§

WindowDrag(Option<bool>)

windowDrag (desktops): pressing the view drags the window, as its title bar would (double-clicking maximizes it); false keeps a part of a draggable view clickable. The nearest view that sets it decides; text fields and views with press or touch handlers inside a draggable view stay clickable without it.

§

WindowControl(Option<WindowControl>)

windowControl (desktops): the view of a title bar the app draws acts as one of the system’s window buttons (minimize, maximize, close): the platform hit-tests it as that button and carries out its press.

§

WindowResize(Option<ResizeEdge>)

windowResize (desktops): pressing the view resizes a frameless window by that edge or corner.

§

Tooltip(TooltipContent)

tooltip: a hint about the view, shown above it on the desktops while the pointer rests on it (after half a second) until the pointer leaves or presses it, never on touch screens; it never takes the pointer. The element is shown as it is; a Tooltip of nsh/base is the tooltip itself, with its placement, delay and events.

§

Focusable(Option<bool>)

focusable: whether the view is a stop of the keyboard focus (Tab, on the platforms that move it between views): true makes any view one, whether or not it takes presses (a chart or a slider in a pressable card, which takes its keys while focused); false leaves a view that takes presses to the pointer (a backdrop that closes a popover). Unset, the views that take presses are stops.

§

KeyCapture(KeyCapture)

captureKeys: the hardware keys this view or a focused descendant consumes before native defaults run: "none", "all", or the canonical keystrokes ("mod+k", "shift+tab") it takes. Decided from mounted props; eligible app shortcuts and focused native inputs keep their keys. Omitting it restores "none".

§

SelectableView(bool)

selectable of a view: the texts in it share one selection, as a browser page’s do (crate::selection); texts with selectable={false} stay out of it, a selectable view inside another is part of the outer one.

§

SelectionMenu(Vec<MenuItem>)

selectionMenu of a selectable view: the app’s items of the system’s selection menu (iOS’s edit menu, Android’s floating text actions, the desktops’ secondary-click menu), after the system’s own, which stay. Plain items and separators only: submenus, roles, shortcuts and check marks are left out. A chosen item is reported as the root’s EventKind::Menu with its id, as a menu’s; the web shows the browser’s menu alone. Empty is unset.

§

ContinuesText(bool)

The text continues the text before it in document order (a long line’s next wrapped part): a selection’s copy joins the two with nothing between them, and a double or triple click selects across them (crate::selection). Set by components (Element::continues_text), never by JS.

§

PassPosition(bool)

The view’s children take its own position among its siblings (first:, last:, odd:, even:, only:), not theirs among its children: a node that only wraps its content. Set by components (Element::__pass_position), never by JS.

§

AllowFontScaling(bool)

allowFontScaling: follow the system text size (default true).

§

MaxFontSizeMultiplier(f32)

maxFontSizeMultiplier: the upper bound of the system scale (0 is none).

§

AdjustsFontSizeToFit(bool)

adjustsFontSizeToFit: shrink the font until the text fits its lines (numberOfLines) and box.

§

MinimumFontScale(f32)

minimumFontScale: how far adjustsFontSizeToFit shrinks at most (0..1).

§

PinchValue(Option<NodeId>)

pinch: two-finger pinches drive scale natively.

§

RotationValue(Option<NodeId>)

rotation: two-finger rotations drive angle (degrees) natively.

§

Screen(ScreenProp)

A screen option.

§

Modal(ModalProp)

A modal option.

§

Overlay(OverlayProp)

An overlay option.

§

HeaderSlot(HeaderSlot)

<headeritem slot>.

§

Native(NativeProp)

A property of a native control (web view, video), or disabled.

Trait Implementations§

Source§

impl Clone for Prop

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Prop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HostProps for Prop

Source§

fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>

The prop JS name name sets with input: None for a name that is not one of these props, Some(None) when nothing is to be set.
Source§

fn reset(&self) -> Option<Self>

This prop at its default (what clearing it from JS sets); None for the props the runtime sets once.
Source§

fn same_kind(&self, other: &Self) -> bool

Whether self and other set the same property.
Source§

fn specs(types: &mut TsTypes, out: &mut Vec<HostPropSpec>)

The props, for the generated TypeScript.
Source§

impl PartialEq for Prop

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Prop

Auto Trait Implementations§

§

impl !RefUnwindSafe for Prop

§

impl !Send for Prop

§

impl !Sync for Prop

§

impl !UnwindSafe for Prop

§

impl Forget for Prop

§

impl Freeze for Prop
where *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<Value>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Value)>>: Freeze, &'static str: Freeze, *const RcInner<dyn Any> is !null: Freeze, PhantomData<RcInner<dyn Any>>: Freeze, *const ArcInner<Program> is !null: Freeze, PhantomData<ArcInner<Program>>: Freeze, *const ArcInner<dyn Any + Send + Sync> is !null: Freeze, PhantomData<ArcInner<dyn Any + Send + Sync>>: Freeze, *const RcInner<Target> is !null: Freeze, PhantomData<RcInner<Target>>: Freeze, PhantomData<(Arc<str>, UniformValue)>: Freeze, *const ArcInner<dyn AsRef<[u8]> + Send + Sync> is !null: Freeze, PhantomData<ArcInner<dyn AsRef<[u8]> + Send + Sync>>: Freeze, *const ArcInner<Rgba> is !null: Freeze, PhantomData<ArcInner<Rgba>>: Freeze, PhantomData<Points>: Freeze, *const ArcInner<Value> is !null: Freeze, PhantomData<ArcInner<Value>>: Freeze, *const RcInner<ListDiff> is !null: Freeze, PhantomData<RcInner<ListDiff>>: Freeze, PhantomData<u32>: Freeze, *const str is !null: Freeze, PhantomData<str>: Freeze, *const RcInner<StylePatch> is !null: Freeze, PhantomData<RcInner<StylePatch>>: Freeze, *const [&'static str] is !null: Freeze, PhantomData<[&'static str]>: Freeze, *const RcInner<ClassList> is !null: Freeze, PhantomData<RcInner<ClassList>>: Freeze, *const ArcInner<Keymap> is !null: Freeze, PhantomData<ArcInner<Keymap>>: Freeze, PhantomData<Box<str>>: Freeze, PhantomData<AccessibilityActionDef>: Freeze, *const ArcInner<[Keystroke]> is !null: Freeze, PhantomData<ArcInner<[Keystroke]>>: Freeze, PhantomData<MenuItem>: Freeze, PhantomData<HeaderItem>: Freeze, PhantomData<SheetDetent>: Freeze, PhantomData<Arc<str>>: Freeze, PhantomData<WebUrlScheme>: Freeze,

§

impl Move for Prop

§

impl Unpin for Prop
where Arc<str>: Unpin, *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, &'static str: Unpin, Rc<dyn Any>: Unpin, Arc<Program>: Unpin, Arc<dyn Any + Send + Sync>: Unpin, Rc<Target>: Unpin, Arc<dyn AsRef<[u8]> + Send + Sync>: Unpin, Arc<Rgba>: Unpin, Arc<Value>: Unpin, Rc<ListDiff>: Unpin, Box<str>: Unpin, Rc<StylePatch>: Unpin, Box<[&'static str]>: Unpin, Rc<ClassList>: Unpin, Arc<Keymap>: Unpin, Arc<[Keystroke]>: Unpin, Arc<dyn Fn(WebResourceRequest) + Send + Sync>: Unpin,

§

impl UnsafeUnpin for Prop
where *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, &'static str: UnsafeUnpin, *const RcInner<dyn Any> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Any>>: UnsafeUnpin, *const ArcInner<Program> is !null: UnsafeUnpin, PhantomData<ArcInner<Program>>: UnsafeUnpin, *const ArcInner<dyn Any + Send + Sync> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Any + Send + Sync>>: UnsafeUnpin, *const RcInner<Target> is !null: UnsafeUnpin, PhantomData<RcInner<Target>>: UnsafeUnpin, PhantomData<(Arc<str>, UniformValue)>: UnsafeUnpin, *const ArcInner<dyn AsRef<[u8]> + Send + Sync> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AsRef<[u8]> + Send + Sync>>: UnsafeUnpin, *const ArcInner<Rgba> is !null: UnsafeUnpin, PhantomData<ArcInner<Rgba>>: UnsafeUnpin, PhantomData<Points>: UnsafeUnpin, *const ArcInner<Value> is !null: UnsafeUnpin, PhantomData<ArcInner<Value>>: UnsafeUnpin, *const RcInner<ListDiff> is !null: UnsafeUnpin, PhantomData<RcInner<ListDiff>>: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, *const str is !null: UnsafeUnpin, PhantomData<str>: UnsafeUnpin, *const RcInner<StylePatch> is !null: UnsafeUnpin, PhantomData<RcInner<StylePatch>>: UnsafeUnpin, *const [&'static str] is !null: UnsafeUnpin, PhantomData<[&'static str]>: UnsafeUnpin, *const RcInner<ClassList> is !null: UnsafeUnpin, PhantomData<RcInner<ClassList>>: UnsafeUnpin, *const ArcInner<Keymap> is !null: UnsafeUnpin, PhantomData<ArcInner<Keymap>>: UnsafeUnpin, PhantomData<Box<str>>: UnsafeUnpin, PhantomData<AccessibilityActionDef>: UnsafeUnpin, *const ArcInner<[Keystroke]> is !null: UnsafeUnpin, PhantomData<ArcInner<[Keystroke]>>: UnsafeUnpin, PhantomData<MenuItem>: UnsafeUnpin, PhantomData<HeaderItem>: UnsafeUnpin, PhantomData<SheetDetent>: UnsafeUnpin, PhantomData<Arc<str>>: UnsafeUnpin, PhantomData<WebUrlScheme>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.