pub struct SlotElement(/* private fields */);Expand description
A slot’s node as a view places it (ParentElement::slot):
style it like a view; its children are the app’s.
Trait Implementations§
Source§impl Accessible for SlotElement
impl Accessible for SlotElement
Source§fn accessible(self, accessible: impl IntoReactive<bool>) -> Self
fn accessible(self, accessible: impl IntoReactive<bool>) -> Self
Whether assistive technologies see it as one element.
Source§fn label(self, label: impl IntoReactive<SharedString>) -> Self
fn label(self, label: impl IntoReactive<SharedString>) -> Self
What screen readers say.
Source§fn optional_label(self, label: impl IntoReactive<Option<SharedString>>) -> Self
fn optional_label(self, label: impl IntoReactive<Option<SharedString>>) -> Self
What screen readers say, while it is set (
None: what its
content says).Source§fn hint(self, hint: impl IntoReactive<SharedString>) -> Self
fn hint(self, hint: impl IntoReactive<SharedString>) -> Self
What happens when activated, for screen readers.
Source§fn optional_hint(self, hint: impl IntoReactive<Option<SharedString>>) -> Self
fn optional_hint(self, hint: impl IntoReactive<Option<SharedString>>) -> Self
Accessible::hint while it is set (None: none), for a
component that hands the app’s optional hint on to its element.Source§fn accessibility_description(
self,
description: impl IntoReactive<SharedString>,
) -> Self
fn accessibility_description( self, description: impl IntoReactive<SharedString>, ) -> Self
More about it than its name, which screen readers read after it
(TS:
accessibilityDescription; gpui-base’s aria_description):
a dialog’s message, what a field expects.Source§fn optional_accessibility_description(
self,
description: impl IntoReactive<Option<SharedString>>,
) -> Self
fn optional_accessibility_description( self, description: impl IntoReactive<Option<SharedString>>, ) -> Self
Accessible::accessibility_description while it is set (None:
none), for a component that hands the app’s optional description
on to its element.Source§fn role(self, role: impl IntoReactive<AccessibilityRole>) -> Self
fn role(self, role: impl IntoReactive<AccessibilityRole>) -> Self
What it is (a button, a header, …).
Source§fn accessibility_state(
self,
state: impl IntoReactive<AccessibilityState>,
) -> Self
fn accessibility_state( self, state: impl IntoReactive<AccessibilityState>, ) -> Self
Its state for screen readers (
disabled follows
Interactive::disabled).Source§fn accessibility_level(self, level: impl IntoReactive<u32>) -> Self
fn accessibility_level(self, level: impl IntoReactive<u32>) -> Self
Its level for screen readers (TS:
accessibilityLevel): a
heading’s (1 the top; gpui-base’s aria_level), a tree item’s
depth (1 at the top); 0 has none.Source§fn accessibility_orientation(
self,
orientation: impl IntoReactive<Option<Axis>>,
) -> Self
fn accessibility_orientation( self, orientation: impl IntoReactive<Option<Axis>>, ) -> Self
The list’s orientation for screen readers (ARIA’s
aria-orientation, reported on the web): "horizontal" or
"vertical", for a tab list or toolbar laid out along that axis;
None has none.Source§fn accessibility_live_region(
self,
region: impl IntoReactive<LiveRegion>,
) -> Self
fn accessibility_live_region( self, region: impl IntoReactive<LiveRegion>, ) -> Self
How changes of it the screen reader announces by itself (TS:
accessibilityLiveRegion): TalkBack on Android, VoiceOver on macOS,
the web’s aria-live, a live region on Windows; "polite" when the
user is idle, "assertive" right away.Source§fn accessibility_active_descendant(
self,
target: impl IntoReactive<Option<ElementRef>>,
) -> Self
fn accessibility_active_descendant( self, target: impl IntoReactive<Option<ElementRef>>, ) -> Self
The element that is the active one while it keeps the keyboard
focus, which screen readers read as it changes (TS:
accessibilityActiveDescendant; ARIA’s aria-activedescendant):
a combo box field’s highlighted option, the cursor row of a list
that is one stop of Tab. The element may be rendered after this
one (a virtualized list’s row); None, or a ref no rendered
element carries, names none.Source§fn accessibility_controls(
self,
target: impl IntoReactive<Option<ElementRef>>,
) -> Self
fn accessibility_controls( self, target: impl IntoReactive<Option<ElementRef>>, ) -> Self
The element whose content it controls, for assistive technologies
(TS:
accessibilityControls; ARIA’s aria-controls): a combo
box field’s listbox. None names none.Source§fn accessibility_described_by(
self,
target: impl IntoReactive<Option<ElementRef>>,
) -> Self
fn accessibility_described_by( self, target: impl IntoReactive<Option<ElementRef>>, ) -> Self
The element whose text describes it, for assistive technologies
(TS:
accessibilityDescribedBy; ARIA’s aria-describedby): a
field’s error or help line, which the app places apart from it.
Screen readers read that text after the name, as they read
Accessible::accessibility_description, whose place it takes
while it names a rendered element with text. None names none.Source§fn accessibility_value(
self,
value: impl IntoReactive<Option<AccessibilityValue>>,
) -> Self
fn accessibility_value( self, value: impl IntoReactive<Option<AccessibilityValue>>, ) -> Self
Its value for screen readers, for a range (a progress bar, a
slider:
min, max and now) or as a text; None has none (an
indeterminate progress bar keeps its range and leaves out now).Hides it and everything inside it from assistive technologies
while
hidden holds (TS: accessibilityElementsHidden): what a
control shows of a value that another element of it tells screen
readers already (a one-time-code input’s cells, whose text field
says the code).Source§fn accessibility_actions(
self,
actions: impl IntoReactive<Vec<AccessibilityActionDef>>,
) -> Self
fn accessibility_actions( self, actions: impl IntoReactive<Vec<AccessibilityActionDef>>, ) -> Self
The actions assistive technologies offer on it (TS:
accessibilityActions): increment and decrement for an
adjustable element, activate, longpress, or the app’s own with
a label; Interactive::on_accessibility_action hears them.
Bound to signals, the labels follow them in place (the interface’s
language): the element and the screen reader’s focus on it stay,
and the names its handler hears do not change.Source§impl Clone for SlotElement
impl Clone for SlotElement
Source§impl Element for SlotElement
impl Element for SlotElement
Source§fn key(self, key: impl Into<SharedString>) -> Self
fn key(self, key: impl Into<SharedString>) -> Self
Identifies the element among its siblings when they are made again
(a region’s, a list cell’s row; where their order changes).
Source§fn bind_opacity(self, value: &impl Animated) -> Self
fn bind_opacity(self, value: &impl Animated) -> Self
Binds
opacity to an animated value (it moves natively).Source§fn bind_background(self, value: &impl Animated) -> Self
fn bind_background(self, value: &impl Animated) -> Self
Binds the background color to a node of colors
(
super::AnimatedNode::interpolate_colors).Source§fn bind_border_color(self, value: &impl Animated) -> Self
fn bind_border_color(self, value: &impl Animated) -> Self
Binds the color of every border side to a node of colors.
Source§fn bind_color(self, value: &impl Animated) -> Self
fn bind_color(self, value: &impl Animated) -> Self
Binds a text’s color (the whole text) to a node of colors.
Source§fn bind(self, prop: AnimationProp, value: &impl Animated) -> Self
fn bind(self, prop: AnimationProp, value: &impl Animated) -> Self
Binds
prop (anything but a transform step or a canvas argument)
to an animated value (nothing once the value’s owner is gone).Source§fn bind_sticky_top(self, value: &impl Animated) -> Self
fn bind_sticky_top(self, value: &impl Animated) -> Self
A sticky view (
super::Styled::sticky) sticks this animated value
from the top of the scroll view’s viewport, following it (below a
header that moves: header.add(8.0); TS: top set to an animated
value).Source§fn bind_sticky_left(self, value: &impl Animated) -> Self
fn bind_sticky_left(self, value: &impl Animated) -> Self
The same as
Self::bind_sticky_top in a horizontal scroll view.Source§fn bind_transform(self, kind: TransformKind, value: &impl Animated) -> Self
fn bind_transform(self, kind: TransformKind, value: &impl Animated) -> Self
Appends a transform step driven by an animated value, after the styles’
transforms.
Source§fn bind_motion(self, motion: &Motion) -> Self
fn bind_motion(self, motion: &Motion) -> Self
Binds a motion’s channels: its opacity, and its transform after the
styles’ transforms (translations, then rotations, then the scales,
scale folded into scale_x and scale_y).Source§fn bind_translate_x(self, value: &impl Animated) -> Self
fn bind_translate_x(self, value: &impl Animated) -> Self
Moves it right by an animated value (points).
Source§fn bind_translate_y(self, value: &impl Animated) -> Self
fn bind_translate_y(self, value: &impl Animated) -> Self
Moves it down by an animated value (points).
Source§fn bind_scale(self, value: &impl Animated) -> Self
fn bind_scale(self, value: &impl Animated) -> Self
Scales it by an animated value.
Source§fn bind_rotate(self, value: &impl Animated) -> Self
fn bind_rotate(self, value: &impl Animated) -> Self
Rotates it by an animated value (degrees, clockwise).
Source§fn element_ref(self, handle: &ElementRef) -> Self
fn element_ref(self, handle: &ElementRef) -> Self
Puts
handle on this element: its commands (focus, scroll_to)
go here (nothing once the ref’s owner is gone).Source§fn inset_padding(self, insets: impl IntoReactive<EdgeInsets>) -> Self
fn inset_padding(self, insets: impl IntoReactive<EdgeInsets>) -> Self
Padding added to the element’s own (from styles): insets of system
UI, a keyboard.
Source§fn inset_margin(self, insets: impl IntoReactive<EdgeInsets>) -> Self
fn inset_margin(self, insets: impl IntoReactive<EdgeInsets>) -> Self
Margin added to the element’s own.
Source§fn inline_style(self, style: impl IntoReactive<Style>) -> Self
fn inline_style(self, style: impl IntoReactive<Style>) -> Self
An inline style the app passed (a prop of type
Style, React
Native’s names), over the element’s styles.Source§fn state_inline_style(self, style: impl Fn() -> Style + 'static) -> Self
fn state_inline_style(self, style: impl Fn() -> Style + 'static) -> Self
Self::inline_style for a style that changes with the
component’s own state (a popup’s popupEndingStyle over its
popupStyle, Style::then): the typed styles it has at any time
apply, also those it has only later.Source§fn selectable(self, area: impl IntoReactive<bool>) -> Self
fn selectable(self, area: impl IntoReactive<bool>) -> Self
Makes the texts in the view select together, as a browser page’s
do (TSX
<View selectable>): a selection runs from text to text,
across views and TextViews; texts that are not selectable stay
out of it (crate::selection).Source§fn selection_color(self, color: impl IntoReactive<Hsla>) -> Self
fn selection_color(self, color: impl IntoReactive<Hsla>) -> Self
The highlight of the selections of the texts and inputs in the
view that set none of their own, as TSX’s
selection:bg-* class
(Tailwind’s & *::selection): the nearest view around a text that
sets one decides, a text’s or an input’s own color wins. Android
tints the selection handles of a selectable view
(Self::selectable) and of an input in it too.The app’s items of the selection menu of this selectable view
(
Self::selectable; TSX selectionMenu): shown after the
system’s own (Copy, Select All, Look Up, Share…), which stay, in
iOS’s edit menu (iOS 16 and later), Android’s floating text actions
and the desktops’ secondary-click menu; the web shows the browser’s
menu alone. Each item’s
MenuItem::on_select runs
when it is chosen; the selected text is the one
Interactive::on_text_selection_change last reported. Plain items
and separators only: submenus, roles, shortcuts and check marks are
left out. The outermost selectable view’s items are the selection’s. Read moreSource§fn continues_text(self, continues: impl IntoReactive<bool>) -> Self
fn continues_text(self, continues: impl IntoReactive<bool>) -> Self
Marks a text as the continuation of the text before it in document
order: a long line a component draws as several texts, one per
wrapped part (
DiffView’s soft wrap). In a selectable view
(Self::selectable) a copy joins the parts with nothing between
them, as the one line they are, and a double or triple click
selects a word or the whole line across them
(crate::selection::SelectionTexts::continues). Off by default.Source§fn copy_text(self, text: impl IntoReactive<SharedString>) -> Self
fn copy_text(self, text: impl IntoReactive<SharedString>) -> Self
What a copy of the text around the view gives in its place, when
the view is inside a text (
copyText): an inline formula’s source
($x^2$), an emoji image’s character. Selecting across the view
and copying puts this where it is, as a browser copies an inline
image’s alt. Unset, the view adds nothing to the copy; a view
outside a text and a nested text span (whose characters are copied
themselves) ignore it. Screen readers keep reading the view’s
Accessible::label. Read moreSource§fn app_class(self, class: impl IntoReactive<Option<SharedString>>) -> Self
fn app_class(self, class: impl IntoReactive<Option<SharedString>>) -> Self
Tailwind classes the app passed (a prop naming the classes of one
of the component’s parts:
classes={{ heading: "text-2xl" }}),
after the element’s own styles, as the app’s class on a
component’s root is: at equal rank they win.Source§impl Interactive for SlotElement
impl Interactive for SlotElement
Source§fn tooltip(self, tooltip: impl IntoTooltip) -> Self
fn tooltip(self, tooltip: impl IntoTooltip) -> Self
A hint about it, 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, and it never takes the pointer.
The element is shown as it is;
nsh_base’s Tooltip is the tooltip
itself, with its own placement, delay and reports.Source§fn on_file_drag_enter<M>(
self,
listener: impl IntoListener<FileDragEvent, M>,
) -> Self
fn on_file_drag_enter<M>( self, listener: impl IntoListener<FileDragEvent, M>, ) -> Self
A local file drag entered this desktop drop destination. The URLs
describe the offered files; their contents are not read. GTK waits
for its file-list preload before reporting entry.
Source§fn on_file_drag_leave<M>(self, listener: impl IntoListener<(), M>) -> Self
fn on_file_drag_leave<M>(self, listener: impl IntoListener<(), M>) -> Self
A local file drag left this desktop drop destination.
Source§fn on_file_drop<M>(self, listener: impl IntoListener<FileDropEvent, M>) -> Self
fn on_file_drop<M>(self, listener: impl IntoListener<FileDropEvent, M>) -> Self
Local files or directories were dropped on this desktop destination.
Source§fn on_mouse_enter<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
fn on_mouse_enter<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
The mouse came over it or an element inside it (never on touches):
where (the DOM’s
mouseenter).Source§fn on_mouse_leave<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
fn on_mouse_leave<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
The mouse left it and the elements inside it, or the window: where
it was last (the DOM’s
mouseleave).Source§fn on_mouse_move<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
fn on_mouse_move<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
The mouse moved over it (or an element inside it), with or without
a button down (
MouseEvent::pressed_button), or a modifier key
changed while it rests there with none down: where, in it and in its
root view, at most once per frame.Source§fn on_wheel<M>(self, listener: impl IntoListener<WheelEvent, M>) -> Self
fn on_wheel<M>(self, listener: impl IntoListener<WheelEvent, M>) -> Self
A mouse wheel or touchpad scrolled over it (or an element inside
it): by how much (
WheelEvent::delta, lines or points), where and
with which modifier keys. The nearest element that listens hears it;
when it is nearer than any scroll view under the pointer it takes
the wheel and nothing scrolls natively (a canvas zooming on
Control + wheel and panning otherwise); a scroll view listening, or
an element around one, only observes it.Source§fn on_pinch<M>(self, listener: impl IntoListener<PinchEvent, M>) -> Self
fn on_pinch<M>(self, listener: impl IntoListener<PinchEvent, M>) -> Self
A touchpad pinch over it (or an element inside it), as GPUI’s
on_pinch: by how much the scale changed since the last event
(PinchEvent::delta), in which phase, where and with which
modifier keys (macOS, Linux, GPUI and Safari; Windows and the other
browsers report a touchpad pinch as Control + wheel, which
Self::on_wheel hears). The nearest element that listens hears
it; when it is nearer than any view that pinches natively it takes
the pinch and nothing zooms natively; a pinch stays on the element
its start went to. A pinch of fingers on a touchscreen is
Self::on_pinch_start’s.Source§fn on_mouse_up<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
fn on_mouse_up<M>(self, listener: impl IntoListener<MouseEvent, M>) -> Self
A mouse button was released over it (or an element inside it): which
button (
button), where, and with the modifier keys. The primary
button’s release also reports Self::on_press_up (the DOM’s
mouseup).Source§fn on_key_down<M>(self, listener: impl IntoListener<KeyEvent, M>) -> Self
fn on_key_down<M>(self, listener: impl IntoListener<KeyEvent, M>) -> Self
A hardware key went down on this view or a focused descendant.
The event carries the source’s logical key, its physical
code and
the modifiers and repeat state; returning from a listener cannot
change handling. KeyEvent::default_prevented reports the
decision made from Self::capture_keys. Notifications bubble to
enabled listening ancestors within the native window; named
shortcuts keep their priority.Source§fn on_key_up<M>(self, listener: impl IntoListener<KeyEvent, M>) -> Self
fn on_key_up<M>(self, listener: impl IntoListener<KeyEvent, M>) -> Self
A hardware key came up on the focused view, with the capture
decision for this transition. It bubbles as
Self::on_key_down
does. A real release the source reports reaches the focused view
even when its press went elsewhere; a window that loses the focus
invents no releases.Source§fn capture_keys(self, capture: impl IntoReactive<KeyCapture>) -> Self
fn capture_keys(self, capture: impl IntoReactive<KeyCapture>) -> Self
Keys consumed on this view or a focused descendant before native
defaults, using mounted rules rather than a listener’s answer. The
keys are canonical
crate::keymap::Keystrokes, matched against
the transition’s canonical shortcut stroke (the backend’s own
matcher, not KeyEvent’s key or code); eligible app
shortcuts and focused native inputs keep priority. Defaults to
KeyCapture::None; removing the prop restores it.The secondary button was pressed over it (a right click,
Control-click on Apple platforms): where, to open a menu at
(
page_x, page_y). The nearest element that listens hears it;
a text input or selectable text nearer shows its own menu instead.Source§fn on_text_selection_change<M>(
self,
listener: impl IntoListener<TextSelectionEvent, M>,
) -> Self
fn on_text_selection_change<M>( self, listener: impl IntoListener<TextSelectionEvent, M>, ) -> Self
The selection across the texts of a selectable view
([
Self::selectable]) changed: the selected text, as a copy gives
it, empty once nothing is selected, where it starts in the view’s
whole text, the box around it in the view and in its root view, and
the list items its ends are in (TSX onSelectionChange of a
<View selectable>, { text, start, bounds, pageBounds, anchor, focus }). Only the outermost selectable view of an area
reports it; an Input’s own selection is its
on_selection_change.Source§fn on_focus<M>(self, listener: impl IntoListener<(), M>) -> Self
fn on_focus<M>(self, listener: impl IntoListener<(), M>) -> Self
It took the keyboard focus: an input, or a view that takes presses
reached by Tab (or
focus()) on the platforms that move the focus
between pressables.Source§fn on_blur<M>(self, listener: impl IntoListener<(), M>) -> Self
fn on_blur<M>(self, listener: impl IntoListener<(), M>) -> Self
It lost the keyboard focus.
Source§fn on_press<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
fn on_press<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
Handles presses:
move || .., or move |e: &PressEvent| .. for
where the pointer was, the modifier keys held and the click count
(e.modifiers.shift for a Shift-click). A press from the keyboard or
an assistive technology, and backends that do not report one, give
PressEvent::default.Source§fn on_long_press<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
fn on_long_press<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
Handles presses held for about half a second.
Source§fn on_press_down<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
fn on_press_down<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
A finger went down on the element.
Source§fn on_press_up<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
fn on_press_up<M>(self, listener: impl IntoListener<PressEvent, M>) -> Self
The press ended, inside or outside the element.
Source§fn on_layout<M>(self, listener: impl IntoListener<Bounds<Points>, M>) -> Self
fn on_layout<M>(self, listener: impl IntoListener<Bounds<Points>, M>) -> Self
Its frame changed (relative to its parent).
Source§fn on_touch<M>(self, listener: impl IntoListener<TouchEvent, M>) -> Self
fn on_touch<M>(self, listener: impl IntoListener<TouchEvent, M>) -> Self
Touches on it or inside it, every phase (custom gestures): the
elements around the finger hear them from it outwards. To have them
alone, claim them (
Interactive::claim_touches).Source§fn claim_touches(self, claim: TouchClaim) -> Self
fn claim_touches(self, claim: TouchClaim) -> Self
Claims the touches of a gesture as
claim says (TS:
onStartShouldSetResponder, PanResponder): as the responder it
hears them alone (on_responder_*), and native scroll views around
it stop taking them over. Several claims may be given.Source§fn pan_activation(self, activation: PanActivation) -> Self
fn pan_activation(self, activation: PanActivation) -> Self
When its pans activate (TS:
panActivation), decided on the main
thread as the finger moves: its native pan (pan_values,
on_pan_start) starts then, and only then, so a drawer’s pan that
opens it to the right leaves the drags to the left to its content
(PanActivation::default().direction(PanDirection::Right)), and
one from the screen’s edge takes only those
(PanActivation::default().edge(PanEdge::Left)). A claim on the pan
(TouchClaim::on_pan) sets it too.Source§fn keep_touches(self, keep: bool) -> Self
fn keep_touches(self, keep: bool) -> Self
As the responder, refuses to hand the touches over to an element
around it that claims them (TS:
onResponderTerminationRequest
returning false); a native scroll view that started dragging first
still takes them.Source§fn on_responder_grant<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_grant<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
It became the responder (TS:
onResponderGrant).Source§fn on_responder_reject<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_reject<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
It claimed the touches, but the responder kept them (TS:
onResponderReject).Source§fn on_responder_start<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_start<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
As the responder, a finger went down (the first one too, after the
grant; TS:
onResponderStart).Source§fn on_responder_move<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_move<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
As the responder, the fingers moved (TS:
onResponderMove).Source§fn on_responder_end<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_end<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
As the responder, a finger lifted (TS:
onResponderEnd).Source§fn on_responder_release<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_release<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
The last finger lifted: it is no longer the responder (TS:
onResponderRelease).Source§fn on_responder_terminate<M>(
self,
listener: impl IntoListener<ResponderEvent, M>,
) -> Self
fn on_responder_terminate<M>( self, listener: impl IntoListener<ResponderEvent, M>, ) -> Self
Another element or a native gesture took the touches over, or the
system cancelled them (TS:
onResponderTerminate).Source§fn pan_values(
self,
x: Option<&AnimatedValue>,
y: Option<&AnimatedValue>,
) -> Self
fn pan_values( self, x: Option<&AnimatedValue>, y: Option<&AnimatedValue>, ) -> Self
Drags move these values natively (by the drag’s translation from
where they were), with no engine work per frame; bind them to its
transform to follow the finger.
on_pan_end reports where they
ended, to spring them on.Source§fn pan_enabled(self, enabled: impl IntoReactive<bool>) -> Self
fn pan_enabled(self, enabled: impl IntoReactive<bool>) -> Self
Enables native pans without replacing their values or listeners.
A disabled pan leaves presses and scrolling to the content.
Source§fn pan_scroll_handoff(self, enabled: impl IntoReactive<bool>) -> Self
fn pan_scroll_handoff(self, enabled: impl IntoReactive<bool>) -> Self
On iOS, a vertical pan shares descendant scroll views’ touches and
follows only the downward distance left after scrolling to the top;
on_pan_start waits until that distance moves its values.
Other platforms keep their normal pan and scroll arbitration.Source§fn pinch_value(self, scale: &AnimatedValue) -> Self
fn pinch_value(self, scale: &AnimatedValue) -> Self
Two-finger pinches scale
scale natively (multiplying the value it
has when the pinch starts; TS: pinch={{ scale }}); bind it to its
transform (Element::bind_scale). on_pinch_start /
on_pinch_end report the pinches.Source§fn rotation_value(self, angle: &AnimatedValue) -> Self
fn rotation_value(self, angle: &AnimatedValue) -> Self
Two-finger rotations turn
angle natively, in degrees (added to
the value it has when the rotation starts; TS: rotation={{ angle }}); bind it to its transform (Element::bind_rotate).Source§fn on_pan_start<M>(self, listener: impl IntoListener<PanEvent, M>) -> Self
fn on_pan_start<M>(self, listener: impl IntoListener<PanEvent, M>) -> Self
A drag started on it (the platform recognizes it).
Source§fn on_pan_end<M>(self, listener: impl IntoListener<PanEvent, M>) -> Self
fn on_pan_end<M>(self, listener: impl IntoListener<PanEvent, M>) -> Self
The drag ended, with its velocity.
Source§fn on_pinch_start<M>(self, listener: impl IntoListener<GestureEvent, M>) -> Self
fn on_pinch_start<M>(self, listener: impl IntoListener<GestureEvent, M>) -> Self
A pinch started (its scale).
Source§fn on_pinch_end<M>(self, listener: impl IntoListener<GestureEvent, M>) -> Self
fn on_pinch_end<M>(self, listener: impl IntoListener<GestureEvent, M>) -> Self
The pinch ended.
Source§fn on_rotation_start<M>(
self,
listener: impl IntoListener<GestureEvent<Radians>, M>,
) -> Self
fn on_rotation_start<M>( self, listener: impl IntoListener<GestureEvent<Radians>, M>, ) -> Self
A two-finger rotation started (its angle).
Source§fn on_rotation_end<M>(
self,
listener: impl IntoListener<GestureEvent<Radians>, M>,
) -> Self
fn on_rotation_end<M>( self, listener: impl IntoListener<GestureEvent<Radians>, M>, ) -> Self
The rotation ended.
Source§fn on_accessibility_action<M>(self, listener: impl IntoListener<str, M>) -> Self
fn on_accessibility_action<M>(self, listener: impl IntoListener<str, M>) -> Self
An assistive technology performed an action (its name).
Source§fn on<M>(
self,
kind: EventKind,
listener: impl IntoListener<EventPayload, M>,
) -> Self
fn on<M>( self, kind: EventKind, listener: impl IntoListener<EventPayload, M>, ) -> Self
Handles native event
kind with its raw payload (the element
listens to it).Source§fn hit_slop(self, insets: impl IntoReactive<EdgeInsets>) -> Self
fn hit_slop(self, insets: impl IntoReactive<EdgeInsets>) -> Self
Presses also count this far outside it.
Source§fn long_press_delay(self, ms: f32) -> Self
fn long_press_delay(self, ms: f32) -> Self
How long a press must last to be a long press, in milliseconds.
Source§fn backdrop_material(self, material: BackdropMaterial) -> Self
fn backdrop_material(self, material: BackdropMaterial) -> Self
The system material of a backdrop blur (iOS).
Source§fn scroll_edge_element(
self,
scroll_view: impl IntoReactive<Option<ElementRef>>,
edge: ScrollEdge,
) -> Self
fn scroll_edge_element( self, scroll_view: impl IntoReactive<Option<ElementRef>>, edge: ScrollEdge, ) -> Self
The scroll view it floats over and the edge of it it sits at
(
ios={{ scrollEdgeElement }}): a bottom toolbar, a floating button
placed over a list. From iOS 26 the scroll edge effect of that
scroll view takes its shape from what the view shows, as it does
from a bar, so the content scrolled under it fades out instead of
being cut by it. Elsewhere a fade the app draws under the view
gives the same separation. None names none.Source§fn macos_backdrop(
self,
backdrop: impl IntoReactive<Option<MacOsBackdrop>>,
) -> Self
fn macos_backdrop( self, backdrop: impl IntoReactive<Option<MacOsBackdrop>>, ) -> Self
The native material the view draws with on macOS
(
macos={{ backdrop }}): an NSVisualEffectView, or none.Source§fn windows_backdrop(
self,
backdrop: impl IntoReactive<Option<WindowsBackdrop>>,
) -> Self
fn windows_backdrop( self, backdrop: impl IntoReactive<Option<WindowsBackdrop>>, ) -> Self
The system’s blur of what is behind a transparent window, under the
view’s box and corners, on Windows 11 and later
(
windows={{ backdrop }}), or none.Source§fn web_element(self, element: WebElement) -> Self
fn web_element(self, element: WebElement) -> Self
The HTML element the web draws the view as (a paragraph, a
landmark, a list), for search engines and readers of the page’s
markup, where
role cannot say it: headings are
role(AccessibilityRole::Header) with a level, links Links. The
other platforms ignore it.Source§fn window_drag(self, enabled: impl IntoReactive<bool>) -> Self
fn window_drag(self, enabled: impl IntoReactive<bool>) -> Self
Whether a desktop press drags the window and a double click follows
the system’s title-bar behavior. The nearest explicit value wins;
inputs and press/touch handlers inside a drag region stay interactive.
On the native desktop backends (AppKit, Win32 and GTK), background
clicks reach the app on release, including ancestor press handlers;
dragging does not deliver a click.
Set false on a child to exclude it from its parent’s drag region.
Source§fn window_control(self, control: WindowControl) -> Self
fn window_control(self, control: WindowControl) -> Self
Makes the view one of the system’s window buttons in a title bar the
app draws (TS:
desktop={{ windowControl }}): the platform hit-tests
it as that button (the snap layouts over a maximize button on
Windows) and carries out its press.Source§fn window_resize(self, edge: ResizeEdge) -> Self
fn window_resize(self, edge: ResizeEdge) -> Self
Pressing the view resizes a frameless window by
edge (TS:
desktop={{ windowResize }}).Source§fn focusable(self, focusable: impl IntoReactive<bool>) -> Self
fn focusable(self, focusable: impl IntoReactive<bool>) -> Self
Whether the view is a stop of the keyboard focus (Tab): true makes
any view one, whether or not it takes presses (a component that
takes its keys while focused, through
on_focus / on_blur and the
keymap, without taking the presses of a pressable around it); false
leaves a view that takes presses to the pointer, as a backdrop that
closes a popover is. Unset, the views that take presses are stops
(crate::ViewProps::focus_stop).Source§fn native_id(self, id: &str) -> Self
fn native_id(self, id: &str) -> Self
nativeID: names the view for others: inputs find an input accessory
by it, and the embedding app a scroll view it watches (watchScroll).Source§fn active(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn active(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while pressed (native: nothing runs).
Source§fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while a pointer hovers it (iPad, Mac, mice).
Source§fn focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while focused.
Source§fn focus_visible(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn focus_visible( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while focused and showing it (Tailwind’s
focus-visible:;
TS: focusVisibleStyle): the keyboard moved the focus there, or it
is an input that edits. Focus a press gave shows Self::focus’s
styles only: the ring for keyboard users goes here.Source§fn focus_within(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn focus_within( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while it or an element inside it is focused (Tailwind’s
focus-within:; TS: focusWithinStyle): a field’s frame ringed
while the input in it edits. An overlay’s content is inside the
element the overlay is in.Source§fn disabled_style(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn disabled_style( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while
Interactive::disabled (Tailwind’s disabled:).Source§fn disabled(self, disabled: impl IntoReactive<bool>) -> Self
fn disabled(self, disabled: impl IntoReactive<bool>) -> Self
No presses nor press feedback; screen readers say it is disabled.
Source§fn selected_style(self, style: impl IntoReactive<Style>) -> Self
fn selected_style(self, style: impl IntoReactive<Style>) -> Self
An app’s style while selected (
accessibility_state selected;
TS: a Button’s selectedStyle), as selected: classes apply.Source§fn checked_style(self, style: impl IntoReactive<Style>) -> Self
fn checked_style(self, style: impl IntoReactive<Style>) -> Self
An app’s style while checked (
accessibility_state checked, not
mixed: a checkbox’s, a switch’s, a radio’s), as checked: classes
apply.Source§fn indeterminate_style(self, style: impl IntoReactive<Style>) -> Self
fn indeterminate_style(self, style: impl IntoReactive<Style>) -> Self
An app’s style while indeterminate (
accessibility_state checked
mixed: a checkbox’s indeterminate), as indeterminate: classes
apply.Source§fn expanded_style(self, style: impl IntoReactive<Style>) -> Self
fn expanded_style(self, style: impl IntoReactive<Style>) -> Self
An app’s style while expanded (
accessibility_state expanded: a
Popover’s or Menu’s trigger while its popup is open), as
aria-expanded: classes apply.Source§fn pressed_style(self, style: impl IntoReactive<Style>) -> Self
fn pressed_style(self, style: impl IntoReactive<Style>) -> Self
An app’s style while a toggle button is on (
accessibility_state
pressed, not mixed), as aria-pressed: classes apply. Not
.active(..), a press in progress.Source§fn project_checked(self, checked: impl IntoReactive<bool>) -> Self
fn project_checked(self, checked: impl IntoReactive<bool>) -> Self
Styles it as checked while
checked holds (its checked: classes
and Self::checked_style), as a part of a control that is: a
switch’s track and thumb, a checkbox’s mark (gpui-base’s
SwitchThumb::new(checked)). Screen readers hear it from the
control alone, so the part is no second checkable element.Source§fn project_indeterminate(self, indeterminate: impl IntoReactive<bool>) -> Self
fn project_indeterminate(self, indeterminate: impl IntoReactive<bool>) -> Self
Styles it as indeterminate while
indeterminate holds (its
indeterminate: classes and Self::indeterminate_style), as a
part of a control that is: a checkbox’s indicator (gpui-base’s
CheckboxIndicator::state(CheckboxState::Indeterminate)). Screen
readers hear it from the control alone.Source§fn project_disabled(self, disabled: impl IntoReactive<bool>) -> Self
fn project_disabled(self, disabled: impl IntoReactive<bool>) -> Self
Styles it as disabled while
disabled holds (its disabled:
classes and Self::disabled_style), as a part of a disabled
control (gpui-base’s SwitchThumb::disabled). The control takes
no presses and tells screen readers; the part keeps its own.Source§fn project_hovered(self, hovered: impl IntoReactive<bool>) -> Self
fn project_hovered(self, hovered: impl IntoReactive<bool>) -> Self
Styles it as hovered while
hovered holds (its hover: classes,
and the group-hover: classes inside it when it is a group), as a
part whose hovers a component’s hit layer over it takes: a table’s
row while the pointer is over it anywhere. Its mouse events stay the
hit layer’s.Source§fn project_focused(self, focused: impl IntoReactive<bool>) -> Self
fn project_focused(self, focused: impl IntoReactive<bool>) -> Self
Styles it as focused while
focused holds (its focus: classes
and focus styles), as the part the keyboard is on inside a control
that keeps the focus itself: the cell of a one-time-code input that
takes the next character, the highlighted option of a list (NSH
has no active descendant). The platform’s focus stays where it is.
While the focus shows (the control’s focus-visible:) the part
shows it too, so focus-visible: on it is the cursor the keyboard
moves and stays off after a press.Source§fn project_group_active(self, group: &'static str) -> Self
fn project_group_active(self, group: &'static str) -> Self
Styles it as pressed while the group
group around it is (its
active: classes and Self::active styles), as a part of a
control held down: a switch’s thumb that stretches while the switch
is held. The press is the group’s as the platform reports it, the
one the group’s own active: follows: it holds while the pointer is
down and ends on release or cancel. Its styles change as for any
other state: transition-* animates what it animates (a transform,
colors, opacity), and layout (a width) changes at once. Screen
readers hear nothing of it; the control takes the presses.Source§fn project_data(self, name: &'static str, on: impl IntoReactive<bool>) -> Self
fn project_data(self, name: &'static str, on: impl IntoReactive<bool>) -> Self
Gives it the boolean
data-* attribute name (without data-)
while on holds, as Tailwind’s data-<name>: variant reads it: 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: project_data("range-start", ..)). For what a
component’s part shows beyond the states screen readers hear; the
attribute tells them nothing. A view whose classes read none of its
attributes sends nothing when they change.Source§impl IntoElement for SlotElement
impl IntoElement for SlotElement
Source§fn into_element(self) -> AnyElement
fn into_element(self) -> AnyElement
As an element.
impl IntoTooltip for SlotElement
Auto Trait Implementations§
impl !RefUnwindSafe for SlotElement
impl !Send for SlotElement
impl !Sync for SlotElement
impl !UnwindSafe for SlotElement
impl Forget for SlotElement
impl Freeze for SlotElementwhere
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const RcInner<StylePatch> is !null: Freeze,
PhantomData<RcInner<StylePatch>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Prop>: Freeze,
*const RareAttrs is !null: Freeze,
PhantomData<RareAttrs>: Freeze,
*const RcInner<Vec<(Variant, Declaration)>> is !null: Freeze,
PhantomData<RcInner<Vec<(Variant, Declaration)>>>: Freeze,
PhantomData<&'static str>: Freeze,
PhantomData<Rc<dyn Fn(&mut StyleRefinement)>>: Freeze,
PhantomData<(EventKind, Listener<EventPayload>)>: Freeze,
*const RcInner<ResponderEl> is !null: Freeze,
PhantomData<RcInner<ResponderEl>>: Freeze,
PhantomData<ElNode>: Freeze,
*const RcInner<dyn Fn(Child, Position) -> AnyElement> is !null: Freeze,
PhantomData<RcInner<dyn Fn(Child, Position) -> AnyElement>>: Freeze,
*const ListEl is !null: Freeze,
PhantomData<ListEl>: Freeze,
*const VirtualListEl is !null: Freeze,
PhantomData<VirtualListEl>: Freeze,
*const dyn AnyProps is !null: Freeze,
PhantomData<dyn AnyProps>: Freeze,
PhantomData<Listener<dyn Any>>: Freeze,
*const (): Freeze,
*const RcInner<dyn Fn() -> Vec<AnyElement>> is !null: Freeze,
PhantomData<RcInner<dyn Fn() -> Vec<AnyElement>>>: Freeze,
*const RcInner<dyn Fn() -> bool> is !null: Freeze,
PhantomData<RcInner<dyn Fn() -> bool>>: Freeze,
*const RcInner<dyn EachRows> is !null: Freeze,
PhantomData<RcInner<dyn EachRows>>: Freeze,
*const RcInner<dyn Fn(ComponentError, Reset) -> Vec<AnyElement>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(ComponentError, Reset) -> Vec<AnyElement>>>: Freeze,
*const RcInner<dyn Fn() -> SharedString> is !null: Freeze,
PhantomData<RcInner<dyn Fn() -> SharedString>>: Freeze,
PhantomData<Rc<dyn Fn(&mut Attrs)>>: Freeze,
PhantomData<Rc<dyn Fn(&mut ListConfig)>>: Freeze,
impl Move for SlotElement
impl Unpin for SlotElementwhere
&'static str: Unpin,
Arc<str>: Unpin,
Rc<StylePatch>: Unpin,
*const u8 is !null: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: 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,
Box<[&'static str]>: Unpin,
Rc<ClassList>: Unpin,
Arc<Keymap>: Unpin,
Arc<[Keystroke]>: Unpin,
Arc<dyn Fn(WebResourceRequest) + Send + Sync>: Unpin,
Box<RareAttrs>: Unpin,
Rc<Vec<(Variant, Declaration)>>: Unpin,
Rc<dyn Fn(&mut StyleRefinement)>: Unpin,
Rc<dyn Fn(&EventPayload)>: Unpin,
Rc<ResponderEl>: Unpin,
Rc<dyn Fn(Child, Position) -> AnyElement>: Unpin,
Box<ListEl>: Unpin,
Box<VirtualListEl>: Unpin,
Box<dyn AnyProps>: Unpin,
Rc<dyn Fn(&(dyn Any + 'static))>: Unpin,
*const (): Unpin,
Rc<dyn Fn() -> Vec<AnyElement>>: Unpin,
Rc<dyn Fn() -> bool>: Unpin,
Rc<dyn EachRows>: Unpin,
Rc<dyn Fn(ComponentError, Reset) -> Vec<AnyElement>>: Unpin,
Rc<dyn Fn() -> SharedString>: Unpin,
Rc<dyn Fn(&mut Attrs)>: Unpin,
Rc<dyn Fn(&mut ListConfig)>: Unpin,
impl UnsafeUnpin for SlotElementwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const RcInner<StylePatch> is !null: UnsafeUnpin,
PhantomData<RcInner<StylePatch>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Prop>: UnsafeUnpin,
*const RareAttrs is !null: UnsafeUnpin,
PhantomData<RareAttrs>: UnsafeUnpin,
*const RcInner<Vec<(Variant, Declaration)>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<(Variant, Declaration)>>>: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&mut StyleRefinement)>>: UnsafeUnpin,
PhantomData<(EventKind, Listener<EventPayload>)>: UnsafeUnpin,
*const RcInner<ResponderEl> is !null: UnsafeUnpin,
PhantomData<RcInner<ResponderEl>>: UnsafeUnpin,
PhantomData<ElNode>: UnsafeUnpin,
*const RcInner<dyn Fn(Child, Position) -> AnyElement> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(Child, Position) -> AnyElement>>: UnsafeUnpin,
*const ListEl is !null: UnsafeUnpin,
PhantomData<ListEl>: UnsafeUnpin,
*const VirtualListEl is !null: UnsafeUnpin,
PhantomData<VirtualListEl>: UnsafeUnpin,
*const dyn AnyProps is !null: UnsafeUnpin,
PhantomData<dyn AnyProps>: UnsafeUnpin,
PhantomData<Listener<dyn Any>>: UnsafeUnpin,
*const (): UnsafeUnpin,
*const RcInner<dyn Fn() -> Vec<AnyElement>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn() -> Vec<AnyElement>>>: UnsafeUnpin,
*const RcInner<dyn Fn() -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn() -> bool>>: UnsafeUnpin,
*const RcInner<dyn EachRows> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn EachRows>>: UnsafeUnpin,
*const RcInner<dyn Fn(ComponentError, Reset) -> Vec<AnyElement>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(ComponentError, Reset) -> Vec<AnyElement>>>: UnsafeUnpin,
*const RcInner<dyn Fn() -> SharedString> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn() -> SharedString>>: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&mut Attrs)>>: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&mut ListConfig)>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FluentBuilder for Twhere
T: Element,
impl<T> FluentBuilder for Twhere
T: Element,
Source§impl<T> IntoElements for Twhere
T: IntoElement,
impl<T> IntoElements for Twhere
T: IntoElement,
Source§fn into_elements(self) -> Vec<AnyElement>
fn into_elements(self) -> Vec<AnyElement>
As elements.
Source§impl<T> Styled for Twhere
T: Element,
impl<T> Styled for Twhere
T: Element,
Source§fn style(&mut self) -> &mut StyleRefinement
fn style(&mut self) -> &mut StyleRefinement
The styles being built.
Source§fn p(self, length: impl IntoReactive<Length>) -> Self
fn p(self, length: impl IntoReactive<Length>) -> Self
Padding on all sides
Source§fn px(self, length: impl IntoReactive<Length>) -> Self
fn px(self, length: impl IntoReactive<Length>) -> Self
Horizontal padding
Source§fn py(self, length: impl IntoReactive<Length>) -> Self
fn py(self, length: impl IntoReactive<Length>) -> Self
Vertical padding
Source§fn pt(self, length: impl IntoReactive<Length>) -> Self
fn pt(self, length: impl IntoReactive<Length>) -> Self
Top padding
Source§fn pr(self, length: impl IntoReactive<Length>) -> Self
fn pr(self, length: impl IntoReactive<Length>) -> Self
Right padding
Source§fn pb(self, length: impl IntoReactive<Length>) -> Self
fn pb(self, length: impl IntoReactive<Length>) -> Self
Bottom padding
Source§fn pl(self, length: impl IntoReactive<Length>) -> Self
fn pl(self, length: impl IntoReactive<Length>) -> Self
Left padding
Source§fn ps(self, length: impl IntoReactive<Length>) -> Self
fn ps(self, length: impl IntoReactive<Length>) -> Self
Leading padding (left in left-to-right layouts)
Source§fn pe(self, length: impl IntoReactive<Length>) -> Self
fn pe(self, length: impl IntoReactive<Length>) -> Self
Trailing padding
Source§fn m(self, length: impl IntoReactive<Length>) -> Self
fn m(self, length: impl IntoReactive<Length>) -> Self
Margin on all sides
Source§fn mx(self, length: impl IntoReactive<Length>) -> Self
fn mx(self, length: impl IntoReactive<Length>) -> Self
Horizontal margin
Source§fn my(self, length: impl IntoReactive<Length>) -> Self
fn my(self, length: impl IntoReactive<Length>) -> Self
Vertical margin
Source§fn mt(self, length: impl IntoReactive<Length>) -> Self
fn mt(self, length: impl IntoReactive<Length>) -> Self
Top margin
Source§fn mr(self, length: impl IntoReactive<Length>) -> Self
fn mr(self, length: impl IntoReactive<Length>) -> Self
Right margin
Source§fn mb(self, length: impl IntoReactive<Length>) -> Self
fn mb(self, length: impl IntoReactive<Length>) -> Self
Bottom margin
Source§fn ml(self, length: impl IntoReactive<Length>) -> Self
fn ml(self, length: impl IntoReactive<Length>) -> Self
Left margin
Source§fn ms(self, length: impl IntoReactive<Length>) -> Self
fn ms(self, length: impl IntoReactive<Length>) -> Self
Leading margin
Source§fn me(self, length: impl IntoReactive<Length>) -> Self
fn me(self, length: impl IntoReactive<Length>) -> Self
Trailing margin
Source§fn gap(self, length: impl IntoReactive<Length>) -> Self
fn gap(self, length: impl IntoReactive<Length>) -> Self
Space between children
Source§fn gap_x(self, length: impl IntoReactive<Length>) -> Self
fn gap_x(self, length: impl IntoReactive<Length>) -> Self
Space between columns
Source§fn gap_y(self, length: impl IntoReactive<Length>) -> Self
fn gap_y(self, length: impl IntoReactive<Length>) -> Self
Space between rows
Source§fn w(self, length: impl IntoReactive<Length>) -> Self
fn w(self, length: impl IntoReactive<Length>) -> Self
Width
Source§fn h(self, length: impl IntoReactive<Length>) -> Self
fn h(self, length: impl IntoReactive<Length>) -> Self
Height
Source§fn size(self, length: impl IntoReactive<Length>) -> Self
fn size(self, length: impl IntoReactive<Length>) -> Self
Width and height
Source§fn min_w(self, length: impl IntoReactive<Length>) -> Self
fn min_w(self, length: impl IntoReactive<Length>) -> Self
Minimum width
Source§fn min_h(self, length: impl IntoReactive<Length>) -> Self
fn min_h(self, length: impl IntoReactive<Length>) -> Self
Minimum height
Source§fn max_w(self, length: impl IntoReactive<Length>) -> Self
fn max_w(self, length: impl IntoReactive<Length>) -> Self
Maximum width
Source§fn max_h(self, length: impl IntoReactive<Length>) -> Self
fn max_h(self, length: impl IntoReactive<Length>) -> Self
Maximum height
Source§fn top(self, length: impl IntoReactive<Length>) -> Self
fn top(self, length: impl IntoReactive<Length>) -> Self
Distance from the parent’s top edge (absolute layout)
Source§fn right(self, length: impl IntoReactive<Length>) -> Self
fn right(self, length: impl IntoReactive<Length>) -> Self
Distance from the parent’s right edge
Source§fn bottom(self, length: impl IntoReactive<Length>) -> Self
fn bottom(self, length: impl IntoReactive<Length>) -> Self
Distance from the parent’s bottom edge
Source§fn bottom_0p5(self) -> Self
fn bottom_0p5(self) -> Self
Distance from the parent’s bottom edge: 2pt.
Source§fn bottom_1p5(self) -> Self
fn bottom_1p5(self) -> Self
Distance from the parent’s bottom edge: 6pt.
Source§fn bottom_2p5(self) -> Self
fn bottom_2p5(self) -> Self
Distance from the parent’s bottom edge: 10pt.
Source§fn bottom_3p5(self) -> Self
fn bottom_3p5(self) -> Self
Distance from the parent’s bottom edge: 14pt.
Source§fn left(self, length: impl IntoReactive<Length>) -> Self
fn left(self, length: impl IntoReactive<Length>) -> Self
Distance from the parent’s left edge
Source§fn inset(self, length: impl IntoReactive<Length>) -> Self
fn inset(self, length: impl IntoReactive<Length>) -> Self
Distance from every edge of the parent
Source§fn basis(self, length: impl IntoReactive<Length>) -> Self
fn basis(self, length: impl IntoReactive<Length>) -> Self
The flex basis
Source§fn p_safe_area(self) -> Self
fn p_safe_area(self) -> Self
Padding on every side by the safe area’s insets where the view renders
(CSS’s
padding: env(safe-area-inset-*)): the insets of its root
view (the surface’s safe area, a dialog’s, or a page’s below its
header).Source§fn px_safe_area(self) -> Self
fn px_safe_area(self) -> Self
Left and right padding by the safe area’s insets on those edges
(
Styled::p_safe_area).Source§fn py_safe_area(self) -> Self
fn py_safe_area(self) -> Self
Top and bottom padding by the safe area’s insets on those edges
(
Styled::p_safe_area).Source§fn pt_safe_area(self) -> Self
fn pt_safe_area(self) -> Self
Top padding by the safe area’s top inset where the view renders
(CSS’s
padding-top: env(safe-area-inset-top), Styled::p_safe_area).Source§fn pt_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn pt_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Top padding by the safe area’s top inset plus
extra (CSS’s
padding-top: calc(env(safe-area-inset-top) + <extra>)); extra is not negative.Source§fn pr_safe_area(self) -> Self
fn pr_safe_area(self) -> Self
Right padding by the safe area’s right inset where the view renders
(CSS’s
padding-right: env(safe-area-inset-right), Styled::p_safe_area).Source§fn pr_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn pr_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Right padding by the safe area’s right inset plus
extra (CSS’s
padding-right: calc(env(safe-area-inset-right) + <extra>)); extra is not negative.Source§fn pb_safe_area(self) -> Self
fn pb_safe_area(self) -> Self
Bottom padding by the safe area’s bottom inset where the view renders
(CSS’s
padding-bottom: env(safe-area-inset-bottom), Styled::p_safe_area).Source§fn pb_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn pb_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Bottom padding by the safe area’s bottom inset plus
extra (CSS’s
padding-bottom: calc(env(safe-area-inset-bottom) + <extra>)); extra is not negative.Source§fn pl_safe_area(self) -> Self
fn pl_safe_area(self) -> Self
Left padding by the safe area’s left inset where the view renders
(CSS’s
padding-left: env(safe-area-inset-left), Styled::p_safe_area).Source§fn pl_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn pl_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Left padding by the safe area’s left inset plus
extra (CSS’s
padding-left: calc(env(safe-area-inset-left) + <extra>)); extra is not negative.Source§fn pb_keyboard(self) -> Self
fn pb_keyboard(self) -> Self
Bottom padding by the software keyboard’s height over the surface, 0
while it is hidden (CSS’s
padding-bottom: env(keyboard-inset-height)):
content kept above the keyboard, moving with it natively. For a
view that reaches the bottom of the surface.Source§fn pb_keyboard_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn pb_keyboard_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Bottom padding by the keyboard’s height plus
extra (CSS’s
padding-bottom: calc(env(keyboard-inset-height) + <extra>),
Styled::pb_keyboard); extra is not negative.Source§fn m_safe_area(self) -> Self
fn m_safe_area(self) -> Self
Margin on every side by the safe area’s insets where the view renders
(CSS’s
margin: env(safe-area-inset-*)): the insets of its root
view (the surface’s safe area, a dialog’s, or a page’s below its
header).Source§fn mx_safe_area(self) -> Self
fn mx_safe_area(self) -> Self
Left and right margin by the safe area’s insets on those edges
(
Styled::m_safe_area).Source§fn my_safe_area(self) -> Self
fn my_safe_area(self) -> Self
Top and bottom margin by the safe area’s insets on those edges
(
Styled::m_safe_area).Source§fn mt_safe_area(self) -> Self
fn mt_safe_area(self) -> Self
Top margin by the safe area’s top inset where the view renders
(CSS’s
margin-top: env(safe-area-inset-top), Styled::m_safe_area).Source§fn mt_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn mt_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Top margin by the safe area’s top inset plus
extra (CSS’s
margin-top: calc(env(safe-area-inset-top) + <extra>)).Source§fn mr_safe_area(self) -> Self
fn mr_safe_area(self) -> Self
Right margin by the safe area’s right inset where the view renders
(CSS’s
margin-right: env(safe-area-inset-right), Styled::m_safe_area).Source§fn mr_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn mr_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Right margin by the safe area’s right inset plus
extra (CSS’s
margin-right: calc(env(safe-area-inset-right) + <extra>)).Source§fn mb_safe_area(self) -> Self
fn mb_safe_area(self) -> Self
Bottom margin by the safe area’s bottom inset where the view renders
(CSS’s
margin-bottom: env(safe-area-inset-bottom), Styled::m_safe_area).Source§fn mb_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn mb_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Bottom margin by the safe area’s bottom inset plus
extra (CSS’s
margin-bottom: calc(env(safe-area-inset-bottom) + <extra>)).Source§fn ml_safe_area(self) -> Self
fn ml_safe_area(self) -> Self
Left margin by the safe area’s left inset where the view renders
(CSS’s
margin-left: env(safe-area-inset-left), Styled::m_safe_area).Source§fn ml_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn ml_safe_area_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Left margin by the safe area’s left inset plus
extra (CSS’s
margin-left: calc(env(safe-area-inset-left) + <extra>)).Source§fn mb_keyboard(self) -> Self
fn mb_keyboard(self) -> Self
Bottom margin by the software keyboard’s height over the surface, 0
while it is hidden (CSS’s
margin-bottom: env(keyboard-inset-height)):
content kept above the keyboard, moving with it natively. For a
view that reaches the bottom of the surface.Source§fn mb_keyboard_plus(self, extra: impl Into<AbsoluteLength>) -> Self
fn mb_keyboard_plus(self, extra: impl Into<AbsoluteLength>) -> Self
Bottom margin by the keyboard’s height plus
extra (CSS’s
margin-bottom: calc(env(keyboard-inset-height) + <extra>),
Styled::mb_keyboard).Source§fn flex(self) -> Self
fn flex(self) -> Self
Flex layout, its children in a row unless a direction is set (CSS’s
display: flex, Tailwind’s flex). A view that sets no display
lays its children out in a column.Source§fn grid_cols(self, count: impl IntoReactive<u16>) -> Self
fn grid_cols(self, count: impl IntoReactive<u16>) -> Self
count equal grid columns (Tailwind’s grid-cols-3).Source§fn grid_rows(self, count: impl IntoReactive<u16>) -> Self
fn grid_rows(self, count: impl IntoReactive<u16>) -> Self
count equal grid rows.Source§fn grid_template_columns(self, tracks: impl IntoReactive<SharedString>) -> Self
fn grid_template_columns(self, tracks: impl IntoReactive<SharedString>) -> Self
The grid’s columns as CSS tracks (
"200px 1fr", "repeat(auto-fill, minmax(80px, 1fr))", line names).Source§fn grid_template_rows(self, tracks: impl IntoReactive<SharedString>) -> Self
fn grid_template_rows(self, tracks: impl IntoReactive<SharedString>) -> Self
The grid’s rows as CSS tracks.
Source§fn grid_flow_col(self) -> Self
fn grid_flow_col(self) -> Self
Items fill the grid column by column.
Source§fn grid_flow_dense(self) -> Self
fn grid_flow_dense(self) -> Self
Items fill the grid’s holes left by larger ones.
Source§fn col_span(self, count: impl IntoReactive<u16>) -> Self
fn col_span(self, count: impl IntoReactive<u16>) -> Self
In the grid,
count columns wide.Source§fn row_span(self, count: impl IntoReactive<u16>) -> Self
fn row_span(self, count: impl IntoReactive<u16>) -> Self
In the grid,
count rows high.Source§fn col_span_full(self) -> Self
fn col_span_full(self) -> Self
Across every column of the grid.
Source§fn row_span_full(self) -> Self
fn row_span_full(self) -> Self
Across every row of the grid.
Source§fn col_start(self, line: impl IntoReactive<i16>) -> Self
fn col_start(self, line: impl IntoReactive<i16>) -> Self
Starts at column line
line (1 is the first; negative from the
end).Source§fn col_end(self, line: impl IntoReactive<i16>) -> Self
fn col_end(self, line: impl IntoReactive<i16>) -> Self
Ends at column line
line.Source§fn row_start(self, line: impl IntoReactive<i16>) -> Self
fn row_start(self, line: impl IntoReactive<i16>) -> Self
Starts at row line
line.Source§fn row_end(self, line: impl IntoReactive<i16>) -> Self
fn row_end(self, line: impl IntoReactive<i16>) -> Self
Ends at row line
line.Not laid out nor shown.
Source§fn invisible(self) -> Self
fn invisible(self) -> Self
Laid out but not shown, nor what is inside it (CSS’s
visibility: hidden, Tailwind’s invisible, GPUI’s Styled::invisible): it
keeps its place and frame, and takes no presses or keyboard focus.
On a text nested in another (a span), its characters keep their
place in the lines and are left out of copies and screen readers.Source§fn flex_row_reverse(self) -> Self
fn flex_row_reverse(self) -> Self
Children in a row, last first.
Source§fn flex_col_reverse(self) -> Self
fn flex_col_reverse(self) -> Self
Children in a column, last first.
Source§fn flex_grow(self, factor: impl IntoReactive<f32>) -> Self
fn flex_grow(self, factor: impl IntoReactive<f32>) -> Self
Takes free space,
factor times as much as a sibling growing by 1
(flex-grow; Tailwind’s grow-*).Source§fn flex_shrink(self, factor: impl IntoReactive<f32>) -> Self
fn flex_shrink(self, factor: impl IntoReactive<f32>) -> Self
Gives up space when there is too little,
factor times as much as
a sibling shrinking by 1 (flex-shrink).Source§fn flex_shrink_0(self) -> Self
fn flex_shrink_0(self) -> Self
Never shrinks.
Source§fn items_start(self) -> Self
fn items_start(self) -> Self
Children at the cross axis’ start.
Source§fn items_center(self) -> Self
fn items_center(self) -> Self
Children centered on the cross axis.
Source§fn items_stretch(self) -> Self
fn items_stretch(self) -> Self
Children stretched across (the default).
Source§fn items_baseline(self) -> Self
fn items_baseline(self) -> Self
Children aligned on their text baseline.
Source§fn justify_start(self) -> Self
fn justify_start(self) -> Self
Children at the main axis’ start (the default).
Source§fn justify_center(self) -> Self
fn justify_center(self) -> Self
Children centered on the main axis.
Source§fn justify_end(self) -> Self
fn justify_end(self) -> Self
Children at the main axis’ end.
Source§fn justify_between(self) -> Self
fn justify_between(self) -> Self
Free space between children.
Source§fn justify_around(self) -> Self
fn justify_around(self) -> Self
Free space around children.
Source§fn justify_evenly(self) -> Self
fn justify_evenly(self) -> Self
Free space evenly between and around children.
Source§fn content_start(self) -> Self
fn content_start(self) -> Self
Wrapped lines at the cross axis’ start (
alignContent, the default; Tailwind’s content-start).Source§fn content_center(self) -> Self
fn content_center(self) -> Self
Wrapped lines centered on the cross axis (
content-center).Source§fn content_end(self) -> Self
fn content_end(self) -> Self
Wrapped lines at the cross axis’ end (
content-end).Source§fn content_between(self) -> Self
fn content_between(self) -> Self
Free space between wrapped lines (
content-between).Source§fn content_around(self) -> Self
fn content_around(self) -> Self
Free space around wrapped lines (
content-around).Source§fn content_evenly(self) -> Self
fn content_evenly(self) -> Self
Free space evenly between and around wrapped lines (
content-evenly).Source§fn content_stretch(self) -> Self
fn content_stretch(self) -> Self
Wrapped lines stretched to fill the cross axis (
content-stretch).Source§fn self_start(self) -> Self
fn self_start(self) -> Self
Itself at the cross axis’ start.
Source§fn self_center(self) -> Self
fn self_center(self) -> Self
Itself centered on the cross axis.
Source§fn self_stretch(self) -> Self
fn self_stretch(self) -> Self
Itself stretched across.
Source§fn aspect_ratio(self, ratio: impl IntoReactive<f32>) -> Self
fn aspect_ratio(self, ratio: impl IntoReactive<f32>) -> Self
Width over height.
Source§fn aspect_square(self) -> Self
fn aspect_square(self) -> Self
As wide as high.
Source§fn sticky(self) -> Self
fn sticky(self) -> Self
In the flow, and while its parent shows it sticks
top (in a
horizontal scroll view left) from the start of the viewport of the
scroll view around it, as far as the end of its parent’s content box
(CSS position: sticky; .top(..) / .bind_sticky_top(..) say
where).Clips its children.
Source§fn z_index(self, z: impl IntoReactive<i32>) -> Self
fn z_index(self, z: impl IntoReactive<i32>) -> Self
Stacking order among siblings.
Source§fn bg(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn bg(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The background color.
Source§fn opacity(self, opacity: impl IntoReactive<f32>) -> Self
fn opacity(self, opacity: impl IntoReactive<f32>) -> Self
Opacity, 0 (invisible) to 1.
Source§fn rounded(self, radius: impl IntoReactive<Length>) -> Self
fn rounded(self, radius: impl IntoReactive<Length>) -> Self
The corner radius.
Source§fn rounded_none(self) -> Self
fn rounded_none(self) -> Self
No rounded corners.
Source§fn rounded_xs(self) -> Self
fn rounded_xs(self) -> Self
2pt corners.
Source§fn rounded_sm(self) -> Self
fn rounded_sm(self) -> Self
4pt corners.
Source§fn rounded_md(self) -> Self
fn rounded_md(self) -> Self
6pt corners.
Source§fn rounded_lg(self) -> Self
fn rounded_lg(self) -> Self
8pt corners.
Source§fn rounded_xl(self) -> Self
fn rounded_xl(self) -> Self
12pt corners.
Source§fn rounded_2xl(self) -> Self
fn rounded_2xl(self) -> Self
16pt corners.
Source§fn rounded_3xl(self) -> Self
fn rounded_3xl(self) -> Self
24pt corners.
Source§fn rounded_full(self) -> Self
fn rounded_full(self) -> Self
Fully round ends (pills, circles).
Source§fn rounded_t(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_t(self, radius: impl IntoReactive<Length>) -> Self
The top corners’ radius.
Source§fn rounded_b(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_b(self, radius: impl IntoReactive<Length>) -> Self
The bottom corners’ radius.
Source§fn border(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The border width on all sides.
Source§fn border_t_1(self) -> Self
fn border_t_1(self) -> Self
A 1pt top border.
Source§fn border_b_1(self) -> Self
fn border_b_1(self) -> Self
A 1pt bottom border.
Source§fn border_l_1(self) -> Self
fn border_l_1(self) -> Self
A 1pt left border.
Source§fn border_r_1(self) -> Self
fn border_r_1(self) -> Self
A 1pt right border.
Source§fn border_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The border color.
Source§fn border_t(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_t(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The top border’s width.
Source§fn border_r(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_r(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The right border’s width.
Source§fn border_b(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_b(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The bottom border’s width.
Source§fn border_l(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_l(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The left border’s width.
Source§fn border_x(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_x(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The left and right borders’ width.
Source§fn border_y(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_y(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The top and bottom borders’ width.
Source§fn border_s(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_s(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The leading border’s width (left in left-to-right layouts).
Source§fn border_e(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn border_e(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The trailing border’s width.
Source§fn border_t_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_t_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The top border’s color.
Source§fn border_r_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_r_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The right border’s color.
Source§fn border_b_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_b_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The bottom border’s color.
Source§fn border_l_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_l_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The left border’s color.
Source§fn border_x_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_x_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The left and right borders’ color.
Source§fn border_y_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_y_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The top and bottom borders’ color.
Source§fn border_s_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_s_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The leading border’s color.
Source§fn border_e_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn border_e_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The trailing border’s color.
Source§fn border_solid(self) -> Self
fn border_solid(self) -> Self
Solid borders (the default).
Source§fn border_dashed(self) -> Self
fn border_dashed(self) -> Self
Dashed borders.
Source§fn border_dotted(self) -> Self
fn border_dotted(self) -> Self
Dotted borders.
Source§fn border_none(self) -> Self
fn border_none(self) -> Self
No border, whatever the widths set before or after (they take no
space);
Styled::border_solid and the other styles show it again.Source§fn border_curve(self, curve: BorderCurve) -> Self
fn border_curve(self, curve: BorderCurve) -> Self
The shape of its rounded corners.
Source§fn rounded_tl(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_tl(self, radius: impl IntoReactive<Length>) -> Self
The top left corner’s radius.
Source§fn rounded_tr(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_tr(self, radius: impl IntoReactive<Length>) -> Self
The top right corner’s radius.
Source§fn rounded_br(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_br(self, radius: impl IntoReactive<Length>) -> Self
The bottom right corner’s radius.
Source§fn rounded_bl(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_bl(self, radius: impl IntoReactive<Length>) -> Self
The bottom left corner’s radius.
Source§fn rounded_l(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_l(self, radius: impl IntoReactive<Length>) -> Self
The left corners’ radius.
Source§fn rounded_r(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_r(self, radius: impl IntoReactive<Length>) -> Self
The right corners’ radius.
Source§fn rounded_ss(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_ss(self, radius: impl IntoReactive<Length>) -> Self
The top leading corner’s radius (top left in left-to-right
layouts; Tailwind’s
rounded-ss).Source§fn rounded_se(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_se(self, radius: impl IntoReactive<Length>) -> Self
The top trailing corner’s radius (
rounded-se).Source§fn rounded_ee(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_ee(self, radius: impl IntoReactive<Length>) -> Self
The bottom trailing corner’s radius (
rounded-ee).Source§fn rounded_es(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_es(self, radius: impl IntoReactive<Length>) -> Self
The bottom leading corner’s radius (
rounded-es).Source§fn rounded_s(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_s(self, radius: impl IntoReactive<Length>) -> Self
The leading corners’ radius.
Source§fn rounded_e(self, radius: impl IntoReactive<Length>) -> Self
fn rounded_e(self, radius: impl IntoReactive<Length>) -> Self
The trailing corners’ radius.
Source§fn outline(self, width: impl Into<AbsoluteLength>) -> Self
fn outline(self, width: impl Into<AbsoluteLength>) -> Self
An outline
width wide, outside the border; it takes no space.
Solid unless a style method says otherwise, before or after it.Source§fn outline_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn outline_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The outline’s color.
Source§fn outline_offset(self, offset: impl IntoReactive<AbsoluteLength>) -> Self
fn outline_offset(self, offset: impl IntoReactive<AbsoluteLength>) -> Self
The outline’s distance from the border (negative: inside it).
Source§fn outline_dashed(self) -> Self
fn outline_dashed(self) -> Self
A dashed outline (3 points wide unless
Styled::outline sets a
width, as CSS’s medium).Source§fn outline_dotted(self) -> Self
fn outline_dotted(self) -> Self
A dotted outline (3 points wide unless
Styled::outline sets a
width).Source§fn outline_none(self) -> Self
fn outline_none(self) -> Self
No outline.
Source§fn shadow_none(self) -> Self
fn shadow_none(self) -> Self
No shadow.
Source§fn shadow_2xs(self) -> Self
fn shadow_2xs(self) -> Self
Tailwind’s
shadow-2xs.Source§fn shadow_2xl(self) -> Self
fn shadow_2xl(self) -> Self
Tailwind’s
shadow-2xl.Source§fn shadow(self, layers: impl IntoIterator<Item = BoxShadow>) -> Self
fn shadow(self, layers: impl IntoIterator<Item = BoxShadow>) -> Self
Box shadows of its own (CSS’s
box-shadow: offsets, blur, spread,
color, inset), instead of a preset’s.Source§fn shadow_color(self, color: impl Into<AdaptiveColor>) -> Self
fn shadow_color(self, color: impl Into<AdaptiveColor>) -> Self
The shadow’s color: of the presets’ layers (an opaque color keeps
their alpha, Tailwind’s
shadow-sky-500; one with an alpha sets it,
shadow-sky-500/50).Source§fn inset_shadow_2xs(self) -> Self
fn inset_shadow_2xs(self) -> Self
Tailwind’s
inset-shadow-2xs.Source§fn inset_shadow_xs(self) -> Self
fn inset_shadow_xs(self) -> Self
Tailwind’s
inset-shadow-xs.Source§fn inset_shadow_sm(self) -> Self
fn inset_shadow_sm(self) -> Self
Tailwind’s
inset-shadow-sm.Source§fn inset_shadow_none(self) -> Self
fn inset_shadow_none(self) -> Self
No inset shadow.
Source§fn inset_shadow_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn inset_shadow_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The inset shadow’s color (as
Styled::shadow_color for the
presets).Source§fn ring(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn ring(self, width: impl IntoReactive<AbsoluteLength>) -> Self
A ring
width wide around the border (a solid shadow; it takes no
space), in the text color unless Styled::ring_color.Source§fn ring_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn ring_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The ring’s color.
Source§fn ring_offset(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn ring_offset(self, width: impl IntoReactive<AbsoluteLength>) -> Self
A gap of
width between the border and the ring.Source§fn ring_offset_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn ring_offset_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The gap’s color (white by default).
Source§fn ring_inset(self) -> Self
fn ring_inset(self) -> Self
The ring inside the border instead.
Source§fn inset_ring(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn inset_ring(self, width: impl IntoReactive<AbsoluteLength>) -> Self
A second ring
width wide, inside the border.Source§fn inset_ring_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn inset_ring_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The inside ring’s color.
Source§fn bg_linear(self, angle: impl IntoReactive<Radians>) -> Self
fn bg_linear(self, angle: impl IntoReactive<Radians>) -> Self
A linear gradient over the background, along
angle (0 up,
deg(90.0) right), from Styled::gradient_from through
Styled::gradient_via to Styled::gradient_to.Source§fn bg_linear_to_t(self) -> Self
fn bg_linear_to_t(self) -> Self
A linear gradient towards the top.
Source§fn bg_linear_to_r(self) -> Self
fn bg_linear_to_r(self) -> Self
A linear gradient towards the right.
Source§fn bg_linear_to_b(self) -> Self
fn bg_linear_to_b(self) -> Self
A linear gradient towards the bottom.
Source§fn bg_linear_to_l(self) -> Self
fn bg_linear_to_l(self) -> Self
A linear gradient towards the left.
Source§fn bg_linear_to_tr(self) -> Self
fn bg_linear_to_tr(self) -> Self
A linear gradient towards the top right corner.
Source§fn bg_linear_to_br(self) -> Self
fn bg_linear_to_br(self) -> Self
A linear gradient towards the bottom right corner.
Source§fn bg_linear_to_bl(self) -> Self
fn bg_linear_to_bl(self) -> Self
A linear gradient towards the bottom left corner.
Source§fn bg_linear_to_tl(self) -> Self
fn bg_linear_to_tl(self) -> Self
A linear gradient towards the top left corner.
Source§fn bg_conic(self, angle: impl IntoReactive<Radians>) -> Self
fn bg_conic(self, angle: impl IntoReactive<Radians>) -> Self
A conic gradient around the center, starting at
angle (0 up).Source§fn bg_gradient_none(self) -> Self
fn bg_gradient_none(self) -> Self
No gradient.
Source§fn gradient_from(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn gradient_from(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The gradient’s first color (transparent by default).
Source§fn gradient_via(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn gradient_via(self, color: impl IntoReactive<AdaptiveColor>) -> Self
A color in the middle of the gradient.
Source§fn gradient_to(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn gradient_to(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The gradient’s last color (transparent by default).
Source§fn gradient_from_position(self, at: impl IntoReactive<Percentage>) -> Self
fn gradient_from_position(self, at: impl IntoReactive<Percentage>) -> Self
Where the first color is along the gradient (0% by default).
Source§fn gradient_via_position(self, at: impl IntoReactive<Percentage>) -> Self
fn gradient_via_position(self, at: impl IntoReactive<Percentage>) -> Self
Where the middle color is (50% by default).
Source§fn gradient_to_position(self, at: impl IntoReactive<Percentage>) -> Self
fn gradient_to_position(self, at: impl IntoReactive<Percentage>) -> Self
Where the last color is (100% by default).
Source§fn mask_linear(
self,
angle: impl IntoReactive<Radians>,
stops: impl IntoReactive<Vec<ColorStop>>,
) -> Self
fn mask_linear( self, angle: impl IntoReactive<Radians>, stops: impl IntoReactive<Vec<ColorStop>>, ) -> Self
Masks the view and its content with a linear gradient’s alpha:
opaque stops reveal it, transparent stops hide it. Colors do not tint it.
The angle follows CSS (0 up,
deg(90.0) right). Stops accept colors or
(color, position) pairs, with typed fractions or lengths. Both arguments
accept signals and closures (Vec<ColorStop> for reactive stops); static
values create no binding.
.mask_linear(deg(90.0), [transparent_black(), black(), transparent_black()]).
An empty stop vector clears the mask reactively. Includes backdrop filters.
Not drawn on Windows and GPUI.Source§fn mask_radial(self, stops: impl IntoReactive<Vec<ColorStop>>) -> Self
fn mask_radial(self, stops: impl IntoReactive<Vec<ColorStop>>) -> Self
Masks with an elliptical gradient from the center to the farthest corner.
Stops and platform support follow
Styled::mask_linear. Use a
Vec<ColorStop> for signal/closure results, or an array of colors/pairs
for static stops. An empty vector clears the mask reactively.Source§fn clip_path(self, clip: impl IntoReactive<ClipInset>) -> Self
fn clip_path(self, clip: impl IntoReactive<ClipInset>) -> Self
Clips everything it draws, the elements in it included, to
clip
(CSS’s clip-path: inset(..)): a rectangle inset from its box with
rounded corners, outside which presses reach neither it nor what is
in it. Its changes animate with Styled::transition_clip_path
(or Styled::transition_all), so a panel opens out of a corner:
.clip_path(ClipInset::new().bottom(percentage(1.0)).left(percentage(1.0)).rounded(px(12.0)))
while closed, .clip_path(ClipInset::new().rounded(px(12.0))) open.Source§fn clip_path_none(self) -> Self
fn clip_path_none(self) -> Self
Clears the clip path, including in state styles.
Source§fn blur(self, radius: impl Into<Points>) -> Self
fn blur(self, radius: impl Into<Points>) -> Self
Blurs it and its content by
radius (Tailwind’s blur-sm is 8
points).Source§fn brightness(self, amount: f32) -> Self
fn brightness(self, amount: f32) -> Self
Brightens (> 1) or darkens (< 1) it.
Source§fn hue_rotate(self, angle: impl Into<Radians>) -> Self
fn hue_rotate(self, angle: impl Into<Radians>) -> Self
Turns its hues by
angle.Source§fn filter_none(self) -> Self
fn filter_none(self) -> Self
No filters.
Source§fn backdrop_blur(self, radius: impl Into<Points>) -> Self
fn backdrop_blur(self, radius: impl Into<Points>) -> Self
Blurs what is behind it by
radius (frosted glass; give it a
translucent background).Source§fn backdrop_brightness(self, amount: f32) -> Self
fn backdrop_brightness(self, amount: f32) -> Self
Brightens or darkens what is behind it.
Source§fn backdrop_contrast(self, amount: f32) -> Self
fn backdrop_contrast(self, amount: f32) -> Self
Changes the contrast of what is behind it.
Source§fn backdrop_grayscale(self, amount: f32) -> Self
fn backdrop_grayscale(self, amount: f32) -> Self
Turns what is behind it gray.
Source§fn backdrop_hue_rotate(self, angle: impl Into<Radians>) -> Self
fn backdrop_hue_rotate(self, angle: impl Into<Radians>) -> Self
Turns the hues of what is behind it.
Source§fn backdrop_invert(self, amount: f32) -> Self
fn backdrop_invert(self, amount: f32) -> Self
Inverts what is behind it.
Source§fn backdrop_opacity(self, amount: f32) -> Self
fn backdrop_opacity(self, amount: f32) -> Self
Fades what is behind it.
Source§fn backdrop_saturate(self, amount: f32) -> Self
fn backdrop_saturate(self, amount: f32) -> Self
Saturates what is behind it.
Source§fn backdrop_sepia(self, amount: f32) -> Self
fn backdrop_sepia(self, amount: f32) -> Self
Tones what is behind it sepia.
Source§fn backdrop_filter_none(self) -> Self
fn backdrop_filter_none(self) -> Self
No backdrop filters.
Source§fn mix_blend_mode(self, mode: BlendMode) -> Self
fn mix_blend_mode(self, mode: BlendMode) -> Self
How it blends with what is behind it.
Source§fn pointer_events(
self,
pointer_events: impl IntoReactive<PointerEvents>,
) -> Self
fn pointer_events( self, pointer_events: impl IntoReactive<PointerEvents>, ) -> Self
Which touches it and the views in it take (
pointerEvents):
PointerEvents::None none, for the views in it too unless one says
Auto; BoxNone none on itself; BoxOnly none on the views in it.Source§fn select_text(self) -> Self
fn select_text(self) -> Self
Its texts can be selected and copied (
userSelect: "text",
Tailwind’s select-text).Source§fn select_none(self) -> Self
fn select_none(self) -> Self
Its texts cannot be selected (
userSelect: "none", Tailwind’s
select-none).Source§fn glass_effect(self, glass: GlassEffect) -> Self
fn glass_effect(self, glass: GlassEffect) -> Self
Apple’s Liquid Glass behind the element (
glassEffect; iOS 26 and
macOS 26), its backdropFilter elsewhere.Source§fn glass_tint_color(
self,
color: impl IntoReactive<Option<AdaptiveColor>>,
) -> Self
fn glass_tint_color( self, color: impl IntoReactive<Option<AdaptiveColor>>, ) -> Self
The tint of the glass material (
glassTintColor). A color tints the
native glass; None restores its default. Bind an optional adaptive
color to set and clear the tint; static colors can be passed directly.
Has no effect without glassEffect.Source§fn cursor(self, cursor: Cursor) -> Self
fn cursor(self, cursor: Cursor) -> Self
The pointer’s look over the element (
cursor; desktops, and iPad
and Android with a mouse).Source§fn cursor_pointer(self) -> Self
fn cursor_pointer(self) -> Self
The pointing hand over the element: something to press (Tailwind’s
cursor-pointer).Source§fn transition(self) -> Self
fn transition(self) -> Self
Changes of colors, opacity, shadows and transforms animate
(Tailwind’s
transition: 150ms, ease-in-out by default).Source§fn transition_all(self) -> Self
fn transition_all(self) -> Self
Changes of everything that can animate do.
Source§fn transition_colors(self) -> Self
fn transition_colors(self) -> Self
Changes of colors animate.
Source§fn transition_opacity(self) -> Self
fn transition_opacity(self) -> Self
Changes of opacity animate.
Source§fn transition_shadow(self) -> Self
fn transition_shadow(self) -> Self
Changes of shadows animate.
Source§fn transition_transform(self) -> Self
fn transition_transform(self) -> Self
Changes of the transform animate.
Source§fn transition_clip_path(self) -> Self
fn transition_clip_path(self) -> Self
Changes of the clip path animate (CSS’s
transition-property: clip-path).Source§fn transition_mask(self) -> Self
fn transition_mask(self) -> Self
Changes of the mask animate (CSS’s
transition-property: mask-image): gradients of the same shape and stop count move stop
by stop; any other change applies at once.Source§fn transition_none(self) -> Self
fn transition_none(self) -> Self
Changes jump.
Source§fn duration(self, ms: impl IntoReactive<f32>) -> Self
fn duration(self, ms: impl IntoReactive<f32>) -> Self
Transitions last
ms milliseconds.Source§fn delay(self, ms: impl IntoReactive<f32>) -> Self
fn delay(self, ms: impl IntoReactive<f32>) -> Self
Transitions start after
ms milliseconds.Source§fn ease_linear(self) -> Self
fn ease_linear(self) -> Self
Transitions at a constant pace.
Source§fn ease_in_out(self) -> Self
fn ease_in_out(self) -> Self
Transitions that start and end slowly.
Source§fn ease_bezier(self, x1: f32, y1: f32, x2: f32, y2: f32) -> Self
fn ease_bezier(self, x1: f32, y1: f32, x2: f32, y2: f32) -> Self
Transitions along the cubic Bézier curve
x1, y1, x2, y2 (a y
outside 0..1 overshoots).Source§fn ease_spring(self, spring: Spring) -> Self
fn ease_spring(self, spring: Spring) -> Self
Transitions on a spring’s physics (its stiffness, damping and mass;
Tailwind extension
ease-spring-[620,36]): they time themselves,
lasting until the spring settles (Spring::settle_ms), so
Self::duration is not used. A spring that cannot settle (a
stiffness, damping or mass that is not positive) sets nothing.Source§fn animate_spin(self) -> Self
fn animate_spin(self) -> Self
Turns around, forever (Tailwind’s
animate-spin: a loader).Source§fn animate_ping(self) -> Self
fn animate_ping(self) -> Self
Scales up and fades out, forever (
animate-ping: a badge’s pulse).Source§fn animate_pulse(self) -> Self
fn animate_pulse(self) -> Self
Fades to half and back, forever (
animate-pulse: a skeleton).Source§fn animate_bounce(self) -> Self
fn animate_bounce(self) -> Self
Jumps and lands, forever (
animate-bounce).Source§fn animation(self, animation: KeyframeAnimation) -> Self
fn animation(self, animation: KeyframeAnimation) -> Self
A keyframe animation with its own timing (TS:
animationName
with animationDuration, animationDelay,
animationTimingFunction, animationIterationCount,
animationFrameRate):
.animation(KeyframeAnimation::new(Keyframes::Spin).duration(800.0)).Source§fn animate_none(self) -> Self
fn animate_none(self) -> Self
No keyframe animation.
Source§fn scale(self, scale: impl IntoReactive<f32>) -> Self
fn scale(self, scale: impl IntoReactive<f32>) -> Self
Scales from the center (1 is the natural size).
Source§fn scale_x(self, scale: impl IntoReactive<f32>) -> Self
fn scale_x(self, scale: impl IntoReactive<f32>) -> Self
Scales horizontally.
Source§fn scale_y(self, scale: impl IntoReactive<f32>) -> Self
fn scale_y(self, scale: impl IntoReactive<f32>) -> Self
Scales vertically.
Source§fn translate_x(self, offset: impl IntoReactive<DefiniteLength>) -> Self
fn translate_x(self, offset: impl IntoReactive<DefiniteLength>) -> Self
Moves horizontally by
offset (after layout): points, or a
fraction of its own width (relative(-0.5)).Source§fn translate_y(self, offset: impl IntoReactive<DefiniteLength>) -> Self
fn translate_y(self, offset: impl IntoReactive<DefiniteLength>) -> Self
Moves vertically by
offset (after layout): points, or a fraction
of its own height.Source§fn rotate(self, angle: impl IntoReactive<Radians>) -> Self
fn rotate(self, angle: impl IntoReactive<Radians>) -> Self
Rotates by
angle, clockwise.Source§fn rotate_x(self, angle: impl IntoReactive<Radians>) -> Self
fn rotate_x(self, angle: impl IntoReactive<Radians>) -> Self
Rotates by
angle around the horizontal axis (3D; in a view with
Styled::perspective it tilts towards the viewer).Source§fn rotate_y(self, angle: impl IntoReactive<Radians>) -> Self
fn rotate_y(self, angle: impl IntoReactive<Radians>) -> Self
Rotates by
angle around the vertical axis (3D).Source§fn skew_x(self, angle: impl IntoReactive<Radians>) -> Self
fn skew_x(self, angle: impl IntoReactive<Radians>) -> Self
Slants vertical edges by
angle (iOS; Android has no skew).Source§fn skew_y(self, angle: impl IntoReactive<Radians>) -> Self
fn skew_y(self, angle: impl IntoReactive<Radians>) -> Self
Slants horizontal edges by
angle (iOS).Source§fn perspective(self, distance: impl IntoReactive<AbsoluteLength>) -> Self
fn perspective(self, distance: impl IntoReactive<AbsoluteLength>) -> Self
Gives its children depth: their 3D rotations are seen from
distance away (smaller: stronger), from its center (CSS’s
perspective, perspective-*).Source§fn transform_step(
self,
kind: TransformKind,
amount: impl IntoReactive<f32>,
) -> Self
fn transform_step( self, kind: TransformKind, amount: impl IntoReactive<f32>, ) -> Self
The step
kind of its transform, by amount. The steps compose in
CSS’s order, whatever the order of the calls: translate, rotate,
scale, then the 3D rotations and the skews.
TransformKind::Perspective is Styled::perspective, its
children’s depth.Source§fn transform_none(self) -> Self
fn transform_none(self) -> Self
No 3D rotations and skews (CSS’s
transform: none; the
translation, rotation and scale are properties of their own, which
Styled::translate_none, Styled::rotate_none and
Styled::scale_none remove).Source§fn translate_none(self) -> Self
fn translate_none(self) -> Self
No translation (also none set before).
Source§fn scale_none(self) -> Self
fn scale_none(self) -> Self
No scale (also none set before).
Source§fn rotate_none(self) -> Self
fn rotate_none(self) -> Self
No rotation (also none set before; the 3D rotations stay).
Source§fn transform_origin(self, origin: TransformOrigin) -> Self
fn transform_origin(self, origin: TransformOrigin) -> Self
The point its transform turns and scales around (the center by
default).
Source§fn origin_top_left(self) -> Self
fn origin_top_left(self) -> Self
Transforms around its top left corner.
Source§fn origin_top(self) -> Self
fn origin_top(self) -> Self
Transforms around the middle of its top edge.
Source§fn origin_top_right(self) -> Self
fn origin_top_right(self) -> Self
Transforms around its top right corner.
Source§fn origin_left(self) -> Self
fn origin_left(self) -> Self
Transforms around the middle of its left edge.
Source§fn origin_center(self) -> Self
fn origin_center(self) -> Self
Transforms around its center (the default).
Source§fn origin_right(self) -> Self
fn origin_right(self) -> Self
Transforms around the middle of its right edge.
Source§fn origin_bottom_left(self) -> Self
fn origin_bottom_left(self) -> Self
Transforms around its bottom left corner.
Source§fn origin_bottom(self) -> Self
fn origin_bottom(self) -> Self
Transforms around the middle of its bottom edge.
Source§fn origin_bottom_right(self) -> Self
fn origin_bottom_right(self) -> Self
Transforms around its bottom right corner.
Source§fn object_fit(self, fit: impl IntoReactive<ResizeMode>) -> Self
fn object_fit(self, fit: impl IntoReactive<ResizeMode>) -> Self
How an image or a video fits its box (
objectFit): Cover (an
image’s default), Contain (a video’s), Stretch (CSS’s fill),
Center (none) or ScaleDown.Source§fn object_position(self, position: ObjectPosition) -> Self
fn object_position(self, position: ObjectPosition) -> Self
Where an image sits in its box once its resize mode has sized it
(CSS’s
object-position; the center by default): a covering image
is cropped around it.Source§fn object_top_left(self) -> Self
fn object_top_left(self) -> Self
Shows an image’s top left corner (Tailwind’s
object-top-left).Source§fn object_top(self) -> Self
fn object_top(self) -> Self
Shows an image’s top (Tailwind’s
object-top): a tall image
covering its box is cropped at the bottom.Source§fn object_top_right(self) -> Self
fn object_top_right(self) -> Self
Shows an image’s top right corner (Tailwind’s
object-top-right).Source§fn object_left(self) -> Self
fn object_left(self) -> Self
Shows an image’s left side (Tailwind’s
object-left).Source§fn object_center(self) -> Self
fn object_center(self) -> Self
Centers an image in its box (Tailwind’s
object-center, the
default).Source§fn object_right(self) -> Self
fn object_right(self) -> Self
Shows an image’s right side (Tailwind’s
object-right).Source§fn object_bottom_left(self) -> Self
fn object_bottom_left(self) -> Self
Shows an image’s bottom left corner (Tailwind’s
object-bottom-left).Source§fn object_bottom(self) -> Self
fn object_bottom(self) -> Self
Shows an image’s bottom (Tailwind’s
object-bottom).Source§fn object_bottom_right(self) -> Self
fn object_bottom_right(self) -> Self
Shows an image’s bottom right corner (Tailwind’s
object-bottom-right).Invisible while its 3D rotations turn it away (a card’s back).
Source§fn backface_visible(self) -> Self
fn backface_visible(self) -> Self
Visible from behind too (the default).
Source§fn text_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn text_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The text color.
Source§fn tint_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn tint_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The tint color (Tailwind’s
tint-*): of template images, and of a
page header’s buttons in super::Screen::header_style_with.Source§fn accent_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn accent_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The color a system control shows its state in (
accentColor, CSS’s
accent-color, Tailwind’s accent-*), which a native component gets
as its accentColor prop, such as the track of a system switch when
on. Set on the control itself; it is not inherited.Source§fn fill_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn fill_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
What the shapes the element draws are filled with (
fill,
Tailwind’s fill-<color>; the elements inside inherit it, as in
CSS): the areas of nsh_base::plot.Source§fn fill_current(self) -> Self
fn fill_current(self) -> Self
The text color as the fill (
fill-current, currentColor).Source§fn stroke_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn stroke_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
What the outlines of the shapes the element draws are painted with
(
stroke, Tailwind’s stroke-<color>; inherited, as in CSS): the
lines and grids of nsh_base::plot.Source§fn stroke_none(self) -> Self
fn stroke_none(self) -> Self
No stroke (
stroke-none).Source§fn stroke_current(self) -> Self
fn stroke_current(self) -> Self
The text color as the stroke (
stroke-current, currentColor).Source§fn stroke_width(self, width: impl IntoReactive<AbsoluteLength>) -> Self
fn stroke_width(self, width: impl IntoReactive<AbsoluteLength>) -> Self
The width of those outlines (
strokeWidth, Tailwind’s
stroke-<number>; 1 by default, inherited).Source§fn text_size(self, size: impl IntoReactive<Length>) -> Self
fn text_size(self, size: impl IntoReactive<Length>) -> Self
The font size, in points.
Source§fn line_height(self, height: impl IntoReactive<LineHeight>) -> Self
fn line_height(self, height: impl IntoReactive<LineHeight>) -> Self
The line height: points (
px(20.0)), or a multiple of the font
size (LineHeight::Multiple(1.5)).Source§fn font_weight(self, weight: FontWeight) -> Self
fn font_weight(self, weight: FontWeight) -> Self
The font weight.
Source§fn font_family(self, family: impl IntoReactive<SharedString>) -> Self
fn font_family(self, family: impl IntoReactive<SharedString>) -> Self
The font family (
None style: the system font is the default).Source§fn underline(self) -> Self
fn underline(self) -> Self
Underlined text (with
Styled::line_through, both lines).Source§fn line_through(self) -> Self
fn line_through(self) -> Self
Struck-through text (with
Styled::underline, both lines).Source§fn no_underline(self) -> Self
fn no_underline(self) -> Self
No underline nor strike-through.
Source§fn text_decoration_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
fn text_decoration_color(self, color: impl IntoReactive<AdaptiveColor>) -> Self
The color of the underline and strike-through (the text’s by
default).
Source§fn text_decoration_solid(self) -> Self
fn text_decoration_solid(self) -> Self
Solid decoration lines (the default).
Source§fn text_decoration_double(self) -> Self
fn text_decoration_double(self) -> Self
Double decoration lines.
Source§fn text_decoration_dotted(self) -> Self
fn text_decoration_dotted(self) -> Self
Dotted decoration lines.
Source§fn text_decoration_dashed(self) -> Self
fn text_decoration_dashed(self) -> Self
Dashed decoration lines.
Source§fn text_decoration_wavy(self) -> Self
fn text_decoration_wavy(self) -> Self
Wavy decoration lines (spelling marks).
Source§fn text_decoration_thickness(self, thickness: impl IntoReactive<Points>) -> Self
fn text_decoration_thickness(self, thickness: impl IntoReactive<Points>) -> Self
The decoration lines’ thickness.
Source§fn underline_offset(self, offset: impl IntoReactive<Points>) -> Self
fn underline_offset(self, offset: impl IntoReactive<Points>) -> Self
The underline’s distance below the baseline.
Source§fn capitalize(self) -> Self
fn capitalize(self) -> Self
Each word shown with a capital first letter.
Source§fn normal_case(self) -> Self
fn normal_case(self) -> Self
Shown as written (undoes an inherited case).
Source§fn tabular_nums(self) -> Self
fn tabular_nums(self) -> Self
Digits of one width, for columns of numbers.
Source§fn proportional_nums(self) -> Self
fn proportional_nums(self) -> Self
Digits of their own widths (the default).
Source§fn oldstyle_nums(self) -> Self
fn oldstyle_nums(self) -> Self
Old-style digits, with ascenders and descenders.
Source§fn lining_nums(self) -> Self
fn lining_nums(self) -> Self
Lining digits, all of capital height.
Source§fn small_caps(self) -> Self
fn small_caps(self) -> Self
Small capitals for lower-case letters.
Source§fn normal_nums(self) -> Self
fn normal_nums(self) -> Self
The font’s own number forms (undoes the number forms set before;
small_caps stays).Source§fn direction(self, direction: impl IntoReactive<LayoutDirection>) -> Self
fn direction(self, direction: impl IntoReactive<LayoutDirection>) -> Self
The layout direction of the view and its subtree (by default its
parent’s; the surface’s follows the user’s language).
Source§fn number_of_lines(self, lines: impl IntoReactive<u32>) -> Self
fn number_of_lines(self, lines: impl IntoReactive<u32>) -> Self
Source§fn text_overflow(self, mode: impl IntoReactive<EllipsizeMode>) -> Self
fn text_overflow(self, mode: impl IntoReactive<EllipsizeMode>) -> Self
Where a clamped text is cut (
textOverflow): its end with an
ellipsis (Tail, the default), its start or middle, or clipped.Source§fn whitespace_nowrap(self) -> Self
fn whitespace_nowrap(self) -> Self
Its texts’ lines never wrap (Tailwind’s
whitespace-nowrap). A
view’s reaches the texts in it, as CSS’s white-space does.Source§fn whitespace_normal(self) -> Self
fn whitespace_normal(self) -> Self
Its texts’ lines wrap (Tailwind’s
whitespace-normal): undoes a
view’s whitespace_nowrap or text_pretty around them.Source§fn text_pretty(self) -> Self
fn text_pretty(self) -> Self
Its texts’ lines wrap without leaving a word or two alone on the
last line (Tailwind’s
text-pretty): a last line shorter than a
quarter of the box takes words from the lines above, without adding
a line. A view’s reaches the texts in it.Source§fn writing_direction(self, direction: WritingDirection) -> Self
fn writing_direction(self, direction: WritingDirection) -> Self
The text’s base direction (by default its content’s).
Source§fn text_justify(self) -> Self
fn text_justify(self) -> Self
Lines stretched to both edges.
Source§fn text_shadow_2xs(self) -> Self
fn text_shadow_2xs(self) -> Self
Tailwind’s
text-shadow-2xs.Source§fn text_shadow_xs(self) -> Self
fn text_shadow_xs(self) -> Self
Tailwind’s
text-shadow-xs.Source§fn text_shadow_sm(self) -> Self
fn text_shadow_sm(self) -> Self
Tailwind’s
text-shadow-sm.Source§fn text_shadow_md(self) -> Self
fn text_shadow_md(self) -> Self
Tailwind’s
text-shadow-md.Source§fn text_shadow_lg(self) -> Self
fn text_shadow_lg(self) -> Self
Tailwind’s
text-shadow-lg.Source§fn text_shadow_none(self) -> Self
fn text_shadow_none(self) -> Self
No text shadow from the presets.
Source§fn text_shadow_color(self, color: impl Into<AdaptiveColor>) -> Self
fn text_shadow_color(self, color: impl Into<AdaptiveColor>) -> Self
The text shadow’s color: of a preset or of
Styled::text_shadow’s
layers (an opaque color keeps their alpha).Source§fn text_shadow(self, layers: impl IntoIterator<Item = TextShadow>) -> Self
fn text_shadow(self, layers: impl IntoIterator<Item = TextShadow>) -> Self
Text shadows of its own (CSS’s
text-shadow: offsets, blur and
color), instead of a preset’s; drawn as the widest one.Source§fn text_center(self) -> Self
fn text_center(self) -> Self
Text centered.
Source§fn text_right(self) -> Self
fn text_right(self) -> Self
Text aligned right.
Source§fn text_indent(self, indent: impl IntoReactive<AbsoluteLength>) -> Self
fn text_indent(self, indent: impl IntoReactive<AbsoluteLength>) -> Self
The first line of every paragraph indented by
indent from the
leading edge (CSS’s text-indent); a negative value is 0, the first
line not hanging into the margin.Source§fn align_baseline(self) -> Self
fn align_baseline(self) -> Self
Inside a text, its bottom on the baseline (the default:
align-baseline).Source§fn align_text_top(self) -> Self
fn align_text_top(self) -> Self
Inside a text, its top at the top of the text’s font
(
align-text-top).Source§fn align_text_bottom(self) -> Self
fn align_text_bottom(self) -> Self
Inside a text, its bottom at the bottom of the text’s font
(
align-text-bottom).Source§fn align_middle(self) -> Self
fn align_middle(self) -> Self
Inside a text, its middle half the font’s x height above the
baseline (
align-middle).Source§fn letter_spacing(self, spacing: impl IntoReactive<AbsoluteLength>) -> Self
fn letter_spacing(self, spacing: impl IntoReactive<AbsoluteLength>) -> Self
Extra space between letters.
Source§fn style_when(
self,
when: impl IntoReactive<bool>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn style_when( self, when: impl IntoReactive<bool>, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
f’s styles while when holds: a value decides once, a signal or a
closure switches them as it changes (Tailwind’s classes made
conditional; native states such as .active need none).Source§fn style_with(
self,
f: impl Fn(StyleRefinement) -> StyleRefinement + 'static,
) -> Self
fn style_with( self, f: impl Fn(StyleRefinement) -> StyleRefinement + 'static, ) -> Self
The styles
f makes, made again when what it reads changes (any
style that depends on the app’s state; a value that changes alone
is better given to its method: .w(move || px(width.get()))).Source§fn dark(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn dark(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles in dark appearance (Tailwind’s
dark:), for what is not a
color: theme colors switch by themselves.Source§fn selected(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn selected(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while selected (Tailwind’s
selected:): the element’s
accessibility state says so (a Button’s selected, a tab’s).Source§fn checked(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn checked(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while checked (Tailwind’s
checked:): the element’s
accessibility state says so, not mixed (a checkbox’s, a switch’s, a
radio’s), or the control it is a part of is
(Interactive::project_checked: a switch’s thumb).Source§fn indeterminate(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn indeterminate( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while indeterminate (Tailwind’s
indeterminate:): the
element’s accessibility state says checked is mixed (a checkbox
that is neither), or the control it is a part of is
(Interactive::project_indeterminate: a checkbox’s indicator).Source§fn expanded(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn expanded(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while expanded (Tailwind’s
aria-expanded:): the element’s
accessibility state says so (a Popover’s or Menu’s trigger
while its popup is open, a collapsible’s header).Source§fn aria_pressed(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn aria_pressed( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while a toggle button is on (Tailwind’s
aria-pressed:):
the element’s accessibility state says it is pressed, not mixed
(gpui-base’s Toggle styled pressed). Not .active(..), a
press in progress.Source§fn group(self) -> Self
fn group(self) -> Self
Makes it a group: the
group_* styles of the elements inside follow
its press, hover and focus (Tailwind’s group).Source§fn group_named(self, name: &'static str) -> Self
fn group_named(self, name: &'static str) -> Self
Makes it the group
name (group/name), for group_*_named
styles inside it that skip nearer groups.Source§fn group_active(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_active( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while the nearest
Styled::group around it is pressed
(group-active:).Source§fn group_hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn group_hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Styles while the nearest group around it is hovered.
Source§fn group_focus_within(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_focus_within( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while an input in the nearest group around it has focus
(
group-focus-within:).Source§fn group_focus_visible(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_focus_visible( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while the nearest group around it has the keyboard focus
and shows it (
group-focus-visible:).Source§fn group_active_named(
self,
name: &'static str,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_active_named( self, name: &'static str, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while the group
name around it is pressed
(group-active/name:).Source§fn group_hover_named(
self,
name: &'static str,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_hover_named( self, name: &'static str, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while the group
name around it is hovered.Source§fn group_focus_within_named(
self,
name: &'static str,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_focus_within_named( self, name: &'static str, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while an input in the group
name around it has focus.Source§fn group_focus_visible_named(
self,
name: &'static str,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_focus_visible_named( self, name: &'static str, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Styles while the group
name around it has the keyboard focus and
shows it (group-focus-visible/name:).