pub enum ElementKind {
Show 47 variants
Container(ContainerProps),
Semantics(SemanticsProps),
SemanticFlex(SemanticFlexProps),
FocusScope(FocusScopeProps),
LayoutQueryRegion(LayoutQueryRegionProps),
InteractivityGate(InteractivityGateProps),
HitTestGate(HitTestGateProps),
FocusTraversalGate(FocusTraversalGateProps),
ForegroundScope(ForegroundScopeProps),
Opacity(OpacityProps),
EffectLayer(EffectLayerProps),
BackdropSourceGroup(BackdropSourceGroupProps),
MaskLayer(MaskLayerProps),
CompositeGroup(CompositeGroupProps),
ViewCache(ViewCacheProps),
VisualTransform(VisualTransformProps),
RenderTransform(RenderTransformProps),
FractionalRenderTransform(FractionalRenderTransformProps),
Anchored(AnchoredProps),
Pressable(PressableProps),
PointerRegion(PointerRegionProps),
TextInputRegion(TextInputRegionProps),
InternalDragRegion(InternalDragRegionProps),
ExternalDragRegion(ExternalDragRegionProps),
RovingFlex(RovingFlexProps),
Stack(StackProps),
Column(ColumnProps),
Row(RowProps),
Spacer(SpacerProps),
Text(TextProps),
StyledText(StyledTextProps),
SelectableText(SelectableTextProps),
TextInput(TextInputProps),
TextArea(TextAreaProps),
ResizablePanelGroup(ResizablePanelGroupProps),
VirtualList(VirtualListProps),
Flex(FlexProps),
Grid(GridProps),
Image(ImageProps),
Canvas(CanvasProps),
ViewportSurface(ViewportSurfaceProps),
SvgIcon(SvgIconProps),
Spinner(SpinnerProps),
HoverRegion(HoverRegionProps),
WheelRegion(WheelRegionProps),
Scroll(ScrollProps),
Scrollbar(ScrollbarProps),
}Variants§
Container(ContainerProps)
Semantics(SemanticsProps)
SemanticFlex(SemanticFlexProps)
A flex container that also contributes a semantics node with a fixed role.
This is used by higher-level libraries (e.g. Radix/shadcn ports) to model structural
grouping (role="group") without introducing an extra semantics wrapper layer that would
otherwise be separated from layout.
FocusScope(FocusScopeProps)
LayoutQueryRegion(LayoutQueryRegionProps)
A layout wrapper used for frame-lagged container queries (ADR 0231).
This is paint- and input-transparent. It exists to provide a stable, queryable bounds snapshot for component-layer “responsive” policies that must adapt to panel width rather than viewport width.
InteractivityGate(InteractivityGateProps)
A transparent wrapper that gates subtree presence and interactivity.
This is a mechanism-oriented primitive intended to support Radix-style authoring outcomes
like forceMount while still being able to make a subtree non-interactive (click/keyboard)
or fully absent from layout/paint, without deleting the subtree (so per-element state can be
preserved).
HitTestGate(HitTestGateProps)
A transparent wrapper that gates pointer hit-testing for a subtree without affecting focus traversal or semantics.
When hit_test == false, the subtree remains present for layout/paint and can still
participate in keyboard focus traversal, but pointer hit-testing will ignore the subtree
(click-through behavior).
This is intended to support editor-grade “peek through” surfaces (ImGui-style
NoMouseInputs) without making the subtree inert for keyboard navigation.
FocusTraversalGate(FocusTraversalGateProps)
A transparent wrapper that gates focus traversal for a subtree without affecting pointer hit-testing or semantics.
When traverse == false, the subtree remains present for layout/paint and pointer
hit-testing, but focus traversal will not recurse into the subtree.
This is intended to support editor-grade “disabled but hoverable” surfaces (e.g. tooltips over disabled items) without requiring authors to restructure hit-testing.
ForegroundScope(ForegroundScopeProps)
A paint- and input-transparent wrapper that installs a subtree-local foreground color.
This is the declarative equivalent of CSS currentColor inheritance or Flutter’s
IconTheme/DefaultTextStyle foreground behavior: descendants that opt into inheriting
foreground color can resolve it from the nearest ForegroundScope.
Note: v2 only covers foreground color. A richer text-style stack (font/size/weight/etc.) can be layered on later without changing the element tree contract.
Opacity(OpacityProps)
EffectLayer(EffectLayerProps)
A scoped post-processing effect group wrapper (ADR 0117).
BackdropSourceGroup(BackdropSourceGroupProps)
A scoped backdrop source group wrapper (ADR 0305).
MaskLayer(MaskLayerProps)
A scoped alpha mask layer wrapper (ADR 0239).
This emits a SceneOp::PushMask/PopMask pair around the subtree during painting. The
mask’s computation bounds are the wrapper’s final layout bounds.
CompositeGroup(CompositeGroupProps)
A scoped isolated compositing group wrapper (ADR 0247).
This emits a SceneOp::PushCompositeGroup/PopCompositeGroup pair around the subtree during
painting. The compositing group’s computation bounds are the wrapper’s final layout bounds.
ViewCache(ViewCacheProps)
Experimental view-level cache boundary wrapper.
When enabled by the runtime, this marks a subtree as a cache root for range-replay and
invalidation containment experiments (see docs/workstreams/gpui-parity-refactor/gpui-parity-refactor.md).
VisualTransform(VisualTransformProps)
RenderTransform(RenderTransformProps)
FractionalRenderTransform(FractionalRenderTransformProps)
Anchored(AnchoredProps)
Pressable(PressableProps)
PointerRegion(PointerRegionProps)
TextInputRegion(TextInputRegionProps)
A focusable, text-input-capable event region primitive.
Unlike TextInput / TextArea, this does not own an internal text model. It exists as a
mechanism-only building block for ecosystem text surfaces (e.g. code editors) that need
to receive Event::TextInput / Event::Ime / clipboard events while owning their own
buffer and rendering pipeline.
InternalDragRegion(InternalDragRegionProps)
An internal drag event listener region primitive.
This is a mechanism-only building block: it does not own policy for any particular drag kind, and is intended to be used by higher-level layers (workspace, docking, etc.).
ExternalDragRegion(ExternalDragRegionProps)
An external OS drag-and-drop event listener region primitive.
This receives Event::ExternalDrag (Enter/Over/Drop/Leave) events and is intended to be
used by higher-level layers to implement portable file-drop workflows (ADR 0053).
RovingFlex(RovingFlexProps)
Stack(StackProps)
Column(ColumnProps)
Row(RowProps)
Spacer(SpacerProps)
Text(TextProps)
StyledText(StyledTextProps)
SelectableText(SelectableTextProps)
TextInput(TextInputProps)
TextArea(TextAreaProps)
ResizablePanelGroup(ResizablePanelGroupProps)
VirtualList(VirtualListProps)
Flex(FlexProps)
Grid(GridProps)
Image(ImageProps)
Canvas(CanvasProps)
A declarative, leaf canvas element for custom scene emission (ADR 0141).
ViewportSurface(ViewportSurfaceProps)
Composites an app-owned render target (Tier A; ADR 0007 / ADR 0038 / ADR 0123).
SvgIcon(SvgIconProps)
Spinner(SpinnerProps)
HoverRegion(HoverRegionProps)
WheelRegion(WheelRegionProps)
An event-only wheel listener that updates an imperative scroll handle.
Unlike Scroll, this element does not translate its children; it only mutates the provided
ScrollHandle and invalidates an optional target.
Scroll(ScrollProps)
Scrollbar(ScrollbarProps)
Trait Implementations§
Source§impl Clone for ElementKind
impl Clone for ElementKind
Source§fn clone(&self) -> ElementKind
fn clone(&self) -> ElementKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more