Expand description
Public Rust facade for SUI.
Most applications can import prelude and construct an App with one
or more Window values. Lower-level runtime, scene, renderer, and widget
types are re-exported for custom widgets, embedding, tests, and tooling.
use sui::prelude::*;
fn main() -> Result<()> {
App::new()
.main_window("Hello SUI", Label::new("Ready"))
.run()
}Re-exports§
pub use app::UiHandle;pub use app::App;pub use app::ResourceRegistry;pub use app::Window;
Modules§
- app
- User-facing application, window, resource, and wake-handle builders.
- composites
- Composite widgets and application-shell building blocks.
- containers
- Layout and containment widgets.
- controls
- Primitive controls, labels, inputs, and icons.
- diagnostics
- Common imports for ordinary SUI application and widget code. Tooling plumbing for inspectors, tests, and benchmarks: frame timings and scene statistics, inspector snapshots and traces, renderer debug captures, desktop automation, and accessibility audits. Applications rarely need it.
- prelude
Structs§
- Action
Card - Action
Tile Geometry - Where
paint_action_tileputs each part of a tile. Build it to size a tile for the theme’s text, or to place a control in the slot thatActionTilePaint::trailing_widthkeeps clear; painting uses the same geometry. - Action
Tile Paint - Adaptive
Breakpoints - Width thresholds used by adaptive widgets.
- Adaptive
View - Retains one subtree per presentation class and switches between them based on the space allocated by the parent.
- Align
- Animated
Value - A value animated by elapsed time: call
AnimatedValue::tickwith each frame’s delta. Retargeting keeps momentum likeMotionValue. - Animation
Binding - Animation
Binding Invalidation - Animation
Document - Animation
Document Format Error - Animation
Editor State - Animation
Player - Animation
Property Path - Animation
Selection - Animation
Target Id - Animation
Tick - Application
- Lower-level application builder for runtime and platform integration.
- Arrange
Ctx - Aspect
Ratio - Constrains one retained child to an aspect ratio without specializing it as an image or media widget.
- Async
Wake Token - Background
- Basic
Syntax Highlighter - Lightweight dependency-free lexer used by the default code-block renderer.
- Blink
- Border
- Bottom
Sheet - A modal surface anchored to the bottom edge of its allocated viewport.
- Breadcrumb
- Breadcrumb
Item - Browser
TabBar - Brush
Preview - Brush
Preview Spec - Button
- Callout
Paint - Canvas
- Canvas
Colors - Widget-owned canvas color overrides. Unset fields resolve from common semantic theme roles on every paint, preserving live theme switching.
- Canvas
Ruler - Canvas
Ruler Colors - Canvas
Stroke - Canvas
Surface - Reusable paint-only canvas background and world-space transform.
- Canvas
Viewport - Canvas
Zoom Context - Changed
- Future returned by
Observable::changedandSignal::changed. - Checkbox
- Checkbox
Indicator State - Clip
- Clipboard
- Shared handle to the clipboard service.
- Code
Panel Paint - Code
Text Line - Code
Text Paint - Code
Text Span - Collection
Anchor - Collection
Extent Index - Variable-height prefix-sum index used by virtual collection policies.
- Collection
Window - Describes the loaded slice of a potentially larger collection.
- Color
- Color
Palette - Color
Palette Swatch - Color
Picker - Color
Picker Colors - Widget-owned color-tool paint overrides. The default appearance is derived from common semantic theme roles rather than global picker-specific tokens.
- Color
Swatch - Command
- Borrowed view of a command while it is delivered on the UI thread.
- Command
Button Paint - Command
Ctx - Context supplied to window and application command controllers.
- Command
Group - Command
Key - A process-local, strongly typed command identifier.
- Command
Palette - Modal presentation shell for application command search and execution.
- Command
Sender - Cloneable, thread-safe producer for application commands.
- Compiled
Clip - Compiled
Timeline - Compiled
Track - Constraint
Query - Serializable, locally evaluated container query.
- Constraint
View - Retains each declarative query branch and visits only the first matching one.
- Constraints
- Context
Menu - Context
Menu Handle - Opens a
ContextMenufrom code, at a point. For a trigger that decides for itself when a menu is asked for, such as a canvas that pans with the right button and wants a menu only for a right-click that does not drag: it handles the press, and opens the menu withSelf::open_at. - Control
Metrics - Control
Palette - Control
Typography - Coverage
Dots - Coverage
Dots Config - Custom
Event - Date
Time Input - A lightweight single-line local date/time field. Values remain strings so
applications can choose their own parsing, timezone, and validation rules;
the suggested format is
YYYY-MM-DD HH:MM. - Decorative
Colors - Vibrant categorical source colors with matched OKLCH lightness and chroma, so no hue shouts over another.
- Decorative
Palette - Derived
ToneRolesfor everyDecorativeHue. - Default
Theme - Desktop
Extension Context - Read-only state supplied to a
DesktopExtensionupdate. - Desktop
Platform - Desktop
Window - A live
winitwindow exposed to a desktop extension. - Detail
Row - Dialog
- Dirty
Region - Disclosure
Button Paint - Display
Capabilities - Dock
- Vertical dock layout with optional fixed-height top and bottom slots.
- Dock
Floating Group - A tab group floating above the docked graph inside the same SUI window.
- Dock
Layout Error - Validation or mutation failure for a docking layout.
- Dock
Panel - Dock
Panel Id - Stable application-defined identity for one dockable panel.
- Dock
Panel Options - Presentation and behavior of one dock panel’s tab.
- Dock
Workspace - Retained editor workspace with a split/tab dock graph and same-window floating panels.
- Dock
Workspace Snapshot - Plain persistence boundary for a docking workspace.
- Dock
Workspace State - Cloneable observable state for
DockWorkspace. - DpiInfo
- Drag
Drop Host - Drag
Drop Scope - Drag
Event - Drag
Preview - Drag
Scope Id - Drag
Session Id - Draggable
- Drop
Effects - A set of drop effects, such as every effect a drag source allows.
- Drop
Target - Effect
Token - Elided
Line - One line of text fitted to a width, ending in “…” when it is cut.
- Embedded
SvgImage Resource - Empty
State - Empty
State Paint - Error
- Event
Ctx - Event
Route Step - Field
Group - File
Dialog Filter - File
Dialog Request - File
Dialog Selection - Fixed
Pane Split - Flex
- Flex
Item - Flex
Item Layout - Flex
Layout - Flex
Line Layout - Flex
Style - Floating
Stack - Floating
View Config - Floating
View Snapshot - Floating
Workspace - Floating
Workspace State - Focus
Scope - Retains focus history for a stable child subtree.
- Focus
Scope State - Shared retained focus history for a
FocusScope. - Focus
State - Font
Family Stack - An ordered, theme-owned font-family preference list.
- Font
Feature - A single OpenType feature setting: a 4-byte tag plus a value (
0disables,1enables, and larger values select an alternate/parameter for features that take one). - Font
Features - An ordered collection of OpenType feature settings applied to a text run. Later settings for the same tag take precedence in the shaper.
- Font
Handle - Font
Registry - Font
Weight - OpenType weight axis value. Conventional named weights span 100..=900; for variable fonts any
value in the font’s
wghtrange is valid. - FormRow
- Form
Section - Frame
Schedule - Framed
Field - A reusable field frame for compound editors such as search/composer rows.
- Gradient
Stop - Grid
- Retained explicit grid container backed by the renderer-independent
sui-layouttrack solver. - Grid
Cell - Grid
Item - Grid
Item Layout - Grid
Layout - Grid
Placement - Grid
Style - HdrColor
Roles - HdrEffect
Tokens - HdrLuminance
Tokens - HdrMaterial
Tokens - HdrPolicy
Tokens - HdrTheme
Tokens - Headless
Platform - Icon
- Icon
Button - Icon
Button Paint - Image
- Image
Handle - Image
Registry - Image
Source - Insets
- Intrinsic
Size - Minimum and preferred content extents reported by a widget along one axis.
- Invalidation
Request - Keyboard
Event - Keyed
Children - Layout-neutral retained child collection reconciled by stable application keys.
- Keyed
Reconcile - Keyed
Stack - A row or column of children kept in step with a list of keyed items.
- Keyframe
- Keyframe
Selection - Label
- Layer
List - Layer
List Item - Layer
List Reorder Change - Layer
Options - Layer
Properties - How a retained layer is presented without repainting it: faded, moved, and scaled. Changing these updates the composited layer only.
- Layout
Context - Layout
Transition - Animates a retained subtree from its previous arranged origin to its new origin while layout itself immediately settles at the destination.
- Leading
Label Cell Paint - Link
- List
Item - List
View - Local
Clipboard Backend - In-process clipboard storage used when no platform backend is installed.
- Local
UrlOpener Backend - Records URLs instead of opening them; used when no platform backend is installed.
- Master
Detail - Shows master and detail side-by-side when space permits, and converts to a focus-restoring navigation stack under compact constraints.
- Master
Detail State - Cloneable navigation state shared by a master-detail layout and the app.
- Material
Token - Measure
Ctx - Measured
Bottom Dock - Vertical dock layout where the bottom child is measured to its natural height.
- Menu
- Menu
Item - Modifiers
- Motion
- A value the runtime animates for a widget.
- Motion
Policy - The motion policy in effect: the user’s
MotionPreferenceplus a time scale for watching transitions in slow motion while debugging. - Motion
Scalar - A 0-to-1 progress value for widget state transitions (hover, press,
focus, reveal) that the widget advances itself from animation frames.
Prefer
Progress, which the runtime advances. - Motion
Value - A value that animates toward its latest target on an absolute clock.
- Native
File Dialogs - Neutral
Ramp - Every structural tier of a theme: surfaces, neutral fills, borders, and ink. Built-in themes author these directly so each preset can choose pure or subtly tinted neutrals; widgets never derive structure from the brand color.
- Notification
Center - Thread-safe producer for transient, window-hosted notifications.
- Notification
Host - Window-level visual and semantic host for a
NotificationCenter. - Notification
Id - Number
Input - Observable
Change - Metadata emitted when an observable value changes.
- Observer
- Cloneable change observer used by observable implementations.
- Oklch
- A color in the perceptual OKLCH space:
lightnessfrom 0 to 1,chromafrom 0 upward (roughly 0.4 at the edge of wide gamuts), andhuein degrees. Equal lightness steps read as equal visual steps, which makes it the natural space for deriving hover, pressed, and contrast variants. - OsClipboard
Backend - OS-clipboard bridge backed by
arboard, installed into the runtime by the desktop platform so widget copy/paste interoperates with other applications. - OsUrl
Opener Backend - Opens URLs with the program the system registers for their scheme, using
the
opencrate. The desktop platform installs it into the runtime. - Overlay
Collision Policy - Overlay
Dismiss Policy - Overlay
Dismiss Request - Overlay
Focus Behavior - Focus behavior shared by every transient presentation policy.
- Overlay
Host - Defines an independent overlay stacking root.
- Overlay
Options - Runtime behavior declared by the logical owner of an overlay.
- Overlay
Placement - Overlay
Placement Request - Overlay
Placement Result - Padding
- Paint
Ctx - Panel
Section - Paragraph
- Text wrapped to a width and laid out once, to measure and then paint.
- Password
Input - A single-line text input that masks its visible value while retaining the
same selection, clipboard, IME, and change-callback behavior as
TextInput. - Path
- Path
Builder - Persistent
Text Layout - Pixel
Canvas - Pixel
Canvas Colors - Pixel
Canvas Export Snapshot - Pixel
Canvas State - Placement
Badge - Placement
Badge Paint - Platform
File - A file the user chose in a file dialog, or found in a chosen folder.
- Platform
Folder - A folder the user chose in a folder dialog, or found inside one.
- Platform
Window - Playback
Span - A stretch of timeline the playhead moved over in one tick.
- Playback
State - Point
- Pointer
Buttons - Pointer
Event - Popover
- Presence
- Shows or hides one child, animating it in and out.
- Presence
Transition - How content looks at the absent end of an enter or exit, and how long each takes.
- Preset
Strip - Progress
- A 0-to-1 progress value for widget state (hover, press, focus, toggle), animated by the runtime.
- Progress
Bar - Property
Row - Pulse
- Pumped
Desktop - A desktop application that its host drives one event-loop turn at a time
with
pump, instead of blocking inDesktopPlatform::run_with. - Radio
Button - Radio
Group - RawMouse
Motion Event - Device-relative mouse motion in the host’s raw, device-specific units.
- Rebuild
OnChange - Hosts a child subtree that is rebuilt whenever a caller-supplied key changes.
- Rebuild
OnConstraints - Hosts a child subtree that is rebuilt whenever layout constraints resolve to a new key.
- Rect
- Registered
External Image - Renderer-neutral metadata for an image whose pixels are owned outside the frame’s CPU image registry.
- Registered
Font - Registered
Image - Render
Output - Renderer
Capabilities - Renderer
Interop - Reorderable
List - Reorderable
List Change - Resolved
Effect Style - Resolved
HdrStyle - Resolved
Material Style - Resolved
Text Face - Responsive
Sidebar - A stable sidebar/content layout that becomes an overlay drawer in compact constraints and a collapsible rail or inline pane in wider constraints.
- Responsive
Sidebar Snapshot - Responsive
Sidebar State - Cloneable application-owned state for a responsive sidebar.
- Rgba
Image - Rich
Attachment - Rich
Block Id - Stable identity for a block in a
RichDocumentModel. - Rich
Document Block - Rich
Document Model - Rich
Document Render Context - Context passed to an application-defined rich-document block renderer.
- Rich
Document Renderer Registry - Registry of block renderers keyed by architecture-neutral names.
- Rich
Document Snapshot - Rich
Document Span - Rich
Document Update - Rich
Document View - Retained, selectable, incrementally updating rich-document widget.
- Rich
Document View State - Shareable retained state for a
RichDocumentView. - Rich
Extension Block - Application-defined structured block rendered through a registry entry.
- Rich
Inline Image - Rich
Inline Style - Rich
Link - Rich
List Item - Rich
Syntax Span - Rich
Text - Rich
Text Source Map - Original source plus the mapping needed to copy source-preserving rich-text selections.
- Rich
Text Source Span - Maps byte ranges in rendered rich text back to the original source.
- Runtime
- Runtime
Application - Safe
Area - Insets one retained child by the current window’s safe area.
- Safe
Area Edges - Selects which edges of
SafeAreaconsume the platform-provided insets. - Safe
Area Insets - Sample
Batch - Sample
Buffer - Sampled
Animation Value - Scene
- Scene
Frame - Scroll
Bar - Scroll
State - Scroll
View - Section
Label - Section
Label Paint - Section
Panel Geometry - Section
Panel Paint - Segmented
Control - Segmented
Control Item - Select
- Selection
Change - Selection
Entry - Selection
Order - Selection
Owner Id - Selection
Point - Selection
Scope - Selector
- Equality-deduplicated derived observable.
- Semantic
Color Token - Semantic
Region - Semantics
Ctx - Semantics
Event - An assistive-technology action directed at a semantic node.
- Semantics
Node - Semantics
Relations - Semantics
State - Semantics
Text Range - Separator
- Shadow
Box - Casts shadows and a glow around its child, as a rounded box the size of the
child. For anything box-shaped that paints its own face, such as an image
or a custom widget, where
Surfacewould paint one too. - Shadow
Params - A soft shadow of a rounded box, as CSS
box-shadowdescribes one. - Shaped
Glyph - Shaped
Text - Shaped
Text Window - Sheet
State - Cloneable presentation state shared by a sheet and application controls.
- Side
Sheet - An overlay panel anchored to a viewport edge.
- Signal
- Cloneable observable storage with equality-deduplicated writes.
- Signal
Meter - Simple
Color Picker - Single
Child - Size
- Sized
Box - Slider
- Source
Id - Stable identity for one observable source.
- Spinner
- Split
State - Cloneable, observable split-pane state.
- Split
State Snapshot - Split
View - Spring
F32 - A spring that follows a moving target, stepped by elapsed time. Use it for
physics-driven motion, such as a dragged handle that springs home carrying
the velocity of the fling; for transitions between states prefer
MotionValuewith anAnimationSpec::Spring. - Spring
Spec - A spring described the way designers tune one: how long it takes to settle, and how much it bounces.
- Stack
- Stack
Host Options - Stack
Surface Options - Stagger
- Delays that start a group of animations one after another, such as list items cascading in.
- Status
Badge - Status
Bar - Status
BarHost - Status
BarSegment - Stroke
Style - Subscription
- Keeps an observable subscription alive.
- Surface
- Surface
Id - Surface
Palette - Switch
- Switch
View - TabBar
- TabBar
Item - One navigation tab, measured and painted as a single optional-icon + label item.
- Table
- Table
Column - Table
Row - Tabs
- Task
- Observable state of a background operation: a
Signalholding aTaskState, plus a generation counter that keeps stale workers from overwriting newer results. - Task
Handle - A worker’s reporting channel for one run of a
Task. - Text
Area - Text
Block Paint - Text
Cell Paint - Text
Cluster - Text
Cursor - Text
Document - Text
Glyph Instance - Text
Input - A single-line text field. Text wider than the field scrolls sideways inside it, keeping the caret in view while the field has focus.
- Text
Layout - Text
Layout Handle - Text
Layout Id - Text
Layout Metadata - Text
Layout Registry - Text
Layout Request - Text
Layout Run - Text
Layout Version - Text
Layout View - Text
Line - Text
Line Window - Text
Measurement - Text
Paragraph - Text
Paragraph Layout - Text
Paragraph Style - Text
Placement - Where text goes in the rect it is painted into.
- Text
Render Policy - TextRun
- Text
RunView - Text
Selection - Text
Selection Geometry - Text
Selection Info - Text
Span - Text
Span Id - Text
Style - Text
Surface - Text
Surface Status - Where editing stands in a
TextSurface, for an inspector or a status bar (seeTextSurface::status). - Text
Surface Style Overlay - Text
Surface Style Span - Theme
- Application-level colors, built-in widget theme, and custom extensions.
- Theme
Aspect Ratios - Theme
Blur Scale - Theme
Breakpoints - Theme
Colors - The source colors of a theme. Everything widgets paint — control states,
soft washes, legible tone text, focus, selection, and the HDR variants —
is derived from these values, so editing any field (for example
primary) keeps every dependent role consistent. - Theme
Containers - Theme
Extensions - Type-indexed storage for application-specific theme values.
- Theme
Font Families - Theme
Font Stack - Theme
Font Weights - Theme
Glows - Glow tokens: soft zero-offset halos reserved for live signals (streaming,
voice, busy indicators, the primary action). Mesh keeps Light glow-free
(light does not glow on paper), gives Dark full glows, and damps Void to
protect OLED panels. Paint with
paint_theme_glow, after resolving them for the output withDefaultTheme::glow_for_output. - Theme
Leading - Theme
Motion - Motion design tokens: a shared vocabulary of animation durations and easing curves so widgets and applications animate consistently.
- Theme
Perspective - Theme
Radii - Theme
Shadow - Theme
Shadow Layer - Theme
Shadows - Theme
Text Scale - Theme
Text Token - Theme
Tracking - Timeline
- Timeline
Marker - A named point in time on a timeline. Players report the markers the playhead passes, so an app can start the next step of a sequence or play a sound in time with the animation.
- Timeline
Player - Timeline
Snap - Timeline
Tick - Timer
Token - Tone
Roles - The derived role set for one chromatic source color: the solid fill and its interaction states, a soft wash, ink that stays legible on plain and soft surfaces, and a translucent-looking outline. Every value is opaque, flattened onto the theme panel.
- Tool
Palette - Tool
Palette Item - Toolbar
- Tooltip
- Track
- Trailing
Slot Row - Transform
- Transient
Notification - Transition
- Tree
Item - Tree
View - UrlOpener
- Shared handle to the URL-opening service.
- UrlPolicy
- Decides which URLs a
UrlOpenerhands to the platform. - Vector
- Virtual
Collection Model - Cloneable observable collection with stable keys and incremental changes.
- Virtual
List - Data-backed retained virtual list with stable keyed row identity.
- Virtual
List State - Virtual
Scroll View - Virtual
Table - Virtual
Table Column - Virtual
Table RowContext - Virtual
Table State - Retained interaction state shared by rebuilt
VirtualTableinstances. - Virtual
Viewport Snapshot - Observable projection of a virtual collection viewport.
- Waker
- A cheap, cloneable,
Sendhandle that wakes the running desktop UI from any thread. Pendingwakecalls are coalesced into one event-loop signal. This is a scheduler primitive: it does not synthesize or route a widget event. - Weak
Observer - Weak observer reference suitable for storage inside custom observables.
- Wgpu
External Texture Context - Cloneable access to the renderer-owned WGPU device and queue.
- Wgpu
External Texture Registry - Shared registry for app-owned textures sampled by SUI’s normal image draw path.
- Wgpu
Renderer - Widget
Children - Widget
Diagnostics Ctx - Collector passed to
Widget::diagnostics. - Widget
Id - Widget
Pod - Standard retained-widget adapter used by the SUI runtime.
- Window
Builder - Window
Cursor State - Desired host cursor state for one runtime window.
- Window
Id - Identifies a host render/input target.
- Window
Render Options - Zip
- Several observables viewed as one tuple-valued source. Built by
combine; observing it directly notifies on a change to any input.
Enums§
- Adaptive
Class - Constraint-derived presentation class for adaptive workspace layouts.
- Alignment
- Animation
Editor Command - Animation
Property - Animation
Spec - How a value travels to a new target: a timed curve or a spring.
- Animation
Value - Animation
Value Kind - Aspect
Ratio Fit - Axis
- Brush
- Brush
Preview Shape - Button
Appearance - The visual treatment used by pressable controls.
- Canvas
Grid Style - Canvas
Ruler Axis - Canvas
Shape - Canvas
Zoom Behavior - Choice
Appearance - The whole-row visual treatment used by checkbox, switch, and radio controls.
- Collection
Anchor Gravity - Collection
Change - Incremental mutation accepted by
VirtualCollectionModel. - Collection
Delta - Key-only change journal consumed by virtual collection widgets.
- Collection
Model Error - Collection
Sync - Result of asking a collection source for changes after a known revision.
- Color
Space - Command
Button Fill - Command
Delivery - Command
Target - Constraint
Orientation - Content
Extent - Controls the child’s measured extent along a scrollable axis.
- Control
Size - Contextual interface-control sizing.
- Cursor
Grab Mode - Requested host behavior for the system cursor.
- Decorative
Hue - A decorative hue from
DecorativeColors. Use decorative hues for categorical emphasis — tags, avatars, node categories, chart series — never for status: status keeps its semantic colors. - Desktop
Pump Status - What a host should do after
PumpedDesktop::pump. - Display
Color Primaries - Dock
Close Action - What the workspace does after a tab’s close button is pressed.
- Dock
Node - One node in the persisted docking graph.
- Dock
Placement - Where a panel added at runtime first appears.
- Dock
Zone - Destination zone used when docking a panel relative to a tab group or the workspace root.
- Drag
Event Kind - Drag
Outcome - Drag
Payload - Drop
Effect - Drop
Hover - Whether a drag is over a
DropTarget, and what the target made of it. - Easing
- Event
- Event
Phase - Event
Route Phase - Field
Appearance - Whether an editor paints its own field chrome.
- File
Dialog Mode - Flex
Align Content - Flex
Basis - Flex
Justify - Flex
Wrap - Focus
Restore Policy - Folder
Entry - A file or folder inside a
PlatformFolder. - Font
Stretch - Font width (the standard nine CSS
font-stretchkeywords / OS/2 width classes). - Font
Style - Font slant.
- Frame
Pacing - How a window’s animation frames are timed.
- Glow
Tone - Which of the theme’s glows to draw.
- Grid
Track - Grid
Track Max - Hairline
Edge - HdrTheme
Mode - Icon
Glyph - Image
Fit - Image
Pixel Snap - Image
Sampling - ImeEvent
- Interaction
Preview - Pins the interaction visuals of a control.
- Invalidation
Kind - Invalidation
Target - KeyState
- Layer
Composition Mode - Loop
Mode - Master
Detail Route - Motion
Preference - How much motion the user wants to see.
- Notification
Urgency - Output
Color Range - How far a window’s output reaches beyond sRGB and SDR white.
- Output
Gamut - The colors an output shows.
- Overflow
- Overlay
Alignment - Overlay
Dismiss Reason - Overlay
Initial Focus - Overlay
Kind - Broad behavior category used by diagnostics and accessibility adapters.
- Overlay
Modality - Overlay
Side - Paint
Boundary Mode - Path
Element - Pixel
Canvas Blend Mode - Pixel
Canvas Brush Shape - Pixel
Canvas Tool - Pointer
Button - Pointer
Event Kind - Pointer
Kind - Popover
Alignment - Property
RowLayout - Registered
Image Format - Requested
Tone Mapping Mode - How extended-range colors fit an SDR output. Colors within SDR range pass through unchanged in every mode, so SDR content looks as authored.
- Responsive
Sidebar Mode - Rich
Document Block Kind - Rich
Document Status - Rich
Inline Kind - Rich
Syntax Token Kind - Scene
Command - Scroll
Alignment - Scroll
Axes - Scroll
Delta - Selection
Clipboard Behavior - Controls whether a selectable widget writes its selection to the clipboard from implicit widget-owned routes such as Ctrl+C and accessibility Copy.
- Selection
Intent - Selection
Payload - Semantic
Tone - Semantics
Action - Semantics
Action Request - A concrete accessibility action requested by a platform assistive-technology provider.
- Semantics
Live Region - Semantics
Popup Kind - Semantics
Role - Semantics
Value - Shadow
Placement - Where a shadow falls relative to the rounded box that casts it.
- Side
Sheet Placement - Simple
Color Picker Mode - The channel sliders a
SimpleColorPickershows. - Split
Extent - Split
Pane Side - Stack
Order Policy - Stagger
Origin - Where a
Staggerstarts: the item that animates first. - Surface
Appearance - Surface
Border - Surface
Elevation - Surface
Role - Table
Column Alignment - Task
State - Lifecycle of a background operation observed through a
Task. - Text
Affinity - Text
Align - Text
Command - Standard clipboard/selection command understood by text editing widgets.
- Text
Coverage Policy - Text
Direction - Text
Flow Direction - Text
Overflow - What a widget does with a label too wide for its space.
- Text
Render Coverage Policy - Text
Render Hinting - Text
Render Mode - Text
Render Stem Darkening - Text
Subpixel Order - Text
Surface Overlay Kind - Text
Wrap - Text
Writing Mode - Theme
Color Scheme - Theme
Density - Toggle
State - Tooltip
Alignment - Tooltip
Placement - Vertical
Align - Where text goes vertically in the rect it is painted into.
- Virtual
List Chrome - Virtual
List Selection Mode - Virtual
Table RowActivation Kind - Virtual
Table Sort Direction - Wake
Event - Widget
Color Role - Widget
Effect Role - Widget
Luminance Role - Widget
Material Role - Widget
Shader - Window
Color Management Mode - Window
Dynamic Range Mode - Window
Event - Window
Icon - Window
Output Color Primaries - Window
Tone Mapping Mode
Constants§
- ANIMATION_
DOCUMENT_ VERSION - BUILTIN_
ICON_ GLYPHS - DEFAULT_
SUI_ LOGO_ SVG - EXTERNAL_
WAKE_ KIND - Legacy root-event kind. Platform wakes no longer synthesize this event; use
CommandSenderand window/application controllers instead. - MIN_
ANIMATION_ DOCUMENT_ VERSION - The oldest document version this build still reads. Version 2 added timeline markers.
- OVERLAY_
DISMISS_ REQUEST - Typed runtime-to-widget request used for centralized dismissal arbitration.
- REACTIVE_
CHANGED - Internal typed notification delivered to widgets whose observable dependencies changed.
- TEXT_
COMMAND - Typed command key used for target-only text command delivery.
Traits§
- Animate
Ctx - A context that can start
Motiontransitions: event, measure, and arrange contexts. - Clipboard
Backend - Storage driver behind a
Clipboardhandle. - Command
Controller - Non-widget application service that receives commands on the UI thread. Controllers are owned by their application/window builder and are dropped automatically with that owner.
- Desktop
Extension - Optional integration driven alongside SUI’s desktop event loop.
- File
Dialog Service - Frame
Clock - Something that knows the time of the frame being produced: widget contexts, or a plain time in seconds.
- Interpolate
- Observable
- Readable value that can notify subscribers after meaningful changes.
- Rich
Syntax Highlighter - Text
Shaper - Lays text out: implemented by the measure and paint contexts, and by
LayoutContext. - Theme
Extension - Marker trait for type-indexed application theme extensions.
- Timeline
Binding Sink - UrlOpener
Backend - Driver behind a
UrlOpenerhandle that hands a URL to the platform. - Virtual
Collection Source - Architecture-neutral data source consumed by
VirtualList. - Widget
- Widget
PodMut Visitor - Widget
PodVisitor
Functions§
- app_
motion_ preference - The app’s motion preference override, if any.
- arrange_
flex - batch
- Run
writesand notify each changedSignalonce when it returns, instead of after every write. - clear_
window_ render_ options - combine
- Derive a value from up to four observables.
- combine_
named combinewith a diagnostics name.- default_
sui_ logo_ image - detail_
row_ height_ for_ value - draw_
glyph - Draw an
IconGlyphtintedcolor, centered and fit withinbounds. Exposed for bespoke painters (application chrome) that draw an icon mark without composing anIconwidget; the glyph is painted directly as native SUI path geometry. - flex_
layout - grid_
layout - Lay out
itemsonstyle’s tracks, adding auto tracks for items placed past them, up toMAX_GRID_TRACKSrows and columns. - invalidation_
for_ animation_ property - motion_
policy - The motion policy in effect on this UI thread: the app’s preference if it set one, otherwise the system’s, with the current time scale.
- motion_
time_ scale - How fast transitions play relative to their nominal durations.
- paint_
action_ tile - Paint a tile with a title, an optional subtitle and an optional leading icon, and return where its parts went.
- paint_
border - paint_
callout - paint_
canvas_ grid - paint_
checkbox_ indicator - paint_
code_ lines - paint_
code_ panel - paint_
command_ button - paint_
coverage_ dots - paint_
coverage_ dots_ with_ config - paint_
detail_ row_ at - paint_
disclosure_ button - paint_
empty_ state - paint_
hairline - paint_
icon_ button - paint_
leading_ label_ cell - paint_
placement_ badge - paint_
placement_ badge_ with - paint_
progress_ bar - paint_
rounded_ panel - paint_
rounded_ rect - paint_
section_ label - paint_
section_ label_ detail - paint_
section_ panel - paint_
status_ badge - paint_
text - Paint
textinrect, wrapped to its width and placed byplacement. - paint_
text_ block - paint_
text_ cell - paint_
text_ line - Paint
texton one line inrect, never wrapping: centered vertically on its capital letters and placed horizontally byalign. - paint_
text_ line_ elided - Paint
texton one line inrectaspaint_text_linedoes, fitted to the rect’s width as anElidedLine: cut text ends in “…” rather than in a glyph cut in half. - paint_
theme_ glow - Paint a glow around a rounded rect: each layer of
glowas a halo outside the rect only, so the rect itself stays clear. It can be painted before the rect’s fill or after it; a translucent fill does not show the halo through it. Resolve a theme glow for the output withDefaultTheme::glow_for_output. - paint_
theme_ inset_ shadow - Paint the inset layers of a
ThemeShadowinside a rounded-rect surface. Call it after filling the surface and before painting its border and content, as CSS draws inset shadows. Pass the surface inside its border asrect, as CSS does, or the border covers the thinnest layers. Outer layers are left forpaint_theme_shadow. - paint_
theme_ shadow - Paint the outer (drop) layers of a
ThemeShadowbehind a rounded-rect surface. The tightersecondlayer is drawn first and the wider/more-diffusefirstlayer on top — matching CSSbox-shadow, where the first-listed shadow is topmost. - place_
overlay - Place an overlay relative to an anchor while keeping it inside a viewport.
- reset_
motion_ settings - Forget the system preference, app override, and time scale. Test harnesses call this so each app starts from full motion.
- resolve_
effect_ role - resolve_
luminance_ role - resolve_
material_ role - resolve_
semantic_ color - resolve_
widget_ hdr_ style - set_
app_ motion_ preference - Override the system’s motion preference for this app, or pass
Noneto follow the system again. - set_
motion_ time_ scale - Play transitions at
time_scalespeed:0.25shows them at quarter speed. Meant for inspecting motion while developing. - set_
system_ motion_ preference - Record the operating system’s motion preference. Platform backends call this at startup and when the setting may have changed.
- set_
window_ render_ options - show_
file_ dialog - Show a dialog from an async context.
- system_
motion_ preference - The operating system’s motion preference, as reported by the platform.
- window_
output_ color_ range - What
window_id’s output can show, once the platform has said. - window_
output_ color_ range_ signal - What
window_id’s output can show, as a signal to observe. It holdsNoneuntil the platform has said, as it does without a platform. - window_
render_ options - wrap_
text_ lines - Paint one unwrapped line using SUI’s shared optical baseline alignment path.
Greedy word-wrap
texttomax_width, usingmeasurefor run widths.
Type Aliases§
- File
Dialog Future - Result
- A result whose error defaults to SUI’s
Error. The error type can be given too, so a glob import of SUI’s prelude leavesResult<T, E>working. - Shared
Compiled Timeline - Stem
Darkening - The renderer’s name for
sui_scene::TextRenderStemDarkening. - Text
Hinting - The renderer’s name for
sui_scene::TextRenderHinting. - Window
Stem Darkening - A window’s stem darkening, the scene’s
sui_scene::TextRenderStemDarkening. - Window
Text Coverage Policy - A window’s text coverage policy, the scene’s
sui_scene::TextRenderCoveragePolicy. - Window
Text Hinting - A window’s text hinting, the scene’s
sui_scene::TextRenderHinting. - Window
Text Subpixel Order - A window’s text subpixel order, the scene’s
sui_scene::TextSubpixelOrder.