Expand description
Building SwiftUI views from Rust, with no Swift source anywhere.
Every view here is made by resolving a mangled symbol and calling it
through the primitives in crate::abi. Results are wrapped in AnyView,
which is a single class reference, so one ViewHandle can stand for any
view regardless of the concrete type SwiftUI built.
This module holds what the rest share — the handle, the helpers that apply a modifier, and the dump used to compare a value against Swift’s — and the bindings themselves are grouped by what they build:
primitives,typography,shapes,stacks,collections— viewslayout,effects,materials,compositing,hover— appearancecontrols,interaction,binding,closures— behaviournavigation,presentation,toolbar,conditional,timelineaccessibility,namespace,generics,interopgenerated,enums,styles,strings,plain,sets,optionsets,concrete— the long tail, grouped by argument shape
The grouping is by argument shape rather than by feature in the last group on purpose: what makes a binding hard is almost never what the modifier does, it is whether its arguments travel in registers or by address.
Re-exports§
pub use super::Rect;
Structs§
- AppleID
Request - The
ASAuthorizationAppleIDRequesttheonRequestcallback is handed. - Bound
State - Rust-side state a SwiftUI control can both read and write.
- Button
Configuration - What a button style is told about the button it is drawing.
- Custom
Animation Curve - A registered animation, as the one word SwiftUI stores.
- Custom
Button Style - A registered style, as the one word SwiftUI stores.
- Custom
Container Key - A registered container-value key.
- Custom
EnvKey - A registered environment key: the conformance, the key path, and the default.
- Custom
Label Style - As
CustomButtonStyle, for labels. - Custom
Layout - A layout algorithm, ready to be given children.
- Custom
Modifier - A registered modifier, as the one word SwiftUI stores.
- Custom
Shape - A registered shape, as the one word SwiftUI stores.
- Custom
Transition - A registered transition, as the one word SwiftUI stores.
- Drag
Operations - Which drag operations a view permits.
- Drag
Value - A
DragGesture.Value, read out of the struct SwiftUI hands the handler. - Edge
Insets SwiftUI.EdgeInsets— four insets, one per edge.- Environment
Values - A borrowed
SwiftUI.EnvironmentValues, live for the body call that got it. - FnLayout
- A
LayoutAlgorithmmade of two closures. - Focus
Key - A registered focused-value key: a synthesised
FocusedValueKeyconformance and theWritableKeyPath<FocusedValues, T?>that reaches it. - Font
- A reusable
SwiftUI.Font. - Gesture
Value - A built
Gesture— its bytes, its type, and the type its handlers see. - Image
- An
Imagevalue, not yet erased to a view. - Item
Provider - An
NSItemProviderSwiftUI handed to a callback, or one built to hand back. - KeyPress
- Which key was pressed, and with what held down.
- Label
Configuration - What a label style is told.
- Magnify
Value - A
MagnifyGesture.Value. - NSView
Rep - A registered representable, as the one word SwiftUI stores.
- Namespace
- A
@Namespace, shared between the views that should match. - Path
Builder - A
Pathunder construction. - Proposal
- What the parent is offering, each dimension possibly unspecified.
- Rect
- The rectangle a layout is given to fill.
- Rotate
Value - A
RotateGesture.Value. - Scroll
Geometry - What a scroll view’s geometry looks like when it changes.
- Scroll
Proxy - The
ScrollViewProxyascroll_view_reader’s closure is handed. - Shape
- A shape value, not yet erased to a view.
- Shape
Path - The path a shape is building.
- Subviews
- The children, as SwiftUI hands them over.
- Transaction
Ref - A
SwiftUI.Transactionbeing handed to a.transactioncallback. - View
Dimensions - How big the view being aligned is.
- View
Handle - A SwiftUI view value, kept concrete.
Enums§
- Accessibility
Child Behavior SwiftUI.AccessibilityChildBehavior.- Accessibility
Trait - A member of
SwiftUI.AccessibilityTraits. - Action
Category - A member of
SwiftUI.AccessibilityActionCategory. - Action
Kind - A member of
SwiftUI.AccessibilityActionKind. - Alignment
SwiftUI.Alignment, a frozen pair of alignment guides.- Alternating
RowBackground Behavior SwiftUI.AlternatingRowBackgroundBehavior.- Animation
Kind SwiftUI.Animation’s built-in curves, as thestatic vars they are.- Apple
Button Label - Which words
SignInWithAppleButtondraws. - Apple
Button Style - How
SignInWithAppleButtonis painted. - Axis
- A scroll or layout axis.
- AxisSet
SwiftUI.Axis.Set, an option set.- Badge
Prominence SwiftUI.BadgeProminence.- Button
Border Shape SwiftUI.ButtonBorderShape.- Button
Repeat Behavior SwiftUI.ButtonRepeatBehavior.- Button
Role SwiftUI.ButtonRole— what a button is, not how it looks.- Button
Sizing SwiftUI.ButtonSizing.- Button
Style - Which primitive button style to apply.
- Character
SetKind - A Foundation
CharacterSet, by the static that names it. - Color
Scheme SwiftUI.ColorScheme, in declaration order.- Container
Background Placement - Where a container background sits.
Where a
.containerBackgroundis drawn. - Content
Margin Placement SwiftUI.ContentMarginPlacement.- Content
Mode SwiftUI.ContentMode— whether content fits inside its frame or fills it.- Content
Transition - How a view’s content changes when its value does.
- Content
Type - A content type, as
UTType’s own static properties name them. - Control
Group Style - The concrete types conforming to
SwiftUI.ControlGroupStyle. - Control
Size SwiftUI.ControlSize, in declaration order.- Coordinate
Space - Where a hover’s location is measured.
- Custom
Content Importance - How prominent a piece of custom accessibility content is.
- Date
Picker Component - A member of
SwiftUI.DatePickerComponents. - Date
Picker Style - The concrete types conforming to
SwiftUI.DatePickerStyle. - Default
Focus Priority - How eagerly SwiftUI honours a default focus request.
- Design
SwiftUI.Font.Design, in declaration order.- Dialog
Severity SwiftUI.DialogSeverity.- Direct
Touch Option - A member of
SwiftUI.AccessibilityDirectTouchOptions. - Disclosure
Group Style - The concrete types conforming to
SwiftUI.DisclosureGroupStyle. - Drag
Drop Previews Formation SwiftUI.DragDropPreviewsFormation.- Drop
Operation - What a drop does with what it is given.
- Dynamic
Range - How much dynamic range an image in this view may use.
- Dynamic
Type Size SwiftUI.DynamicTypeSize, in declaration order.- Edge
- One edge of a rectangle.
- EdgeSet
SwiftUI.Edge.Set, an option set.- Edge
SetMember - A member of
SwiftUI.Edge.Set. - Event
Modifier - A member of
SwiftUI.EventModifiers. - File
Dialog Browser Options SwiftUI.FileDialogBrowserOptions.- File
Outcome - The outcome of a file dialog, as much of it as Rust can read.
- Font
Width - A member of
SwiftUI.Font.Width. - Form
Style - The concrete types conforming to
SwiftUI.FormStyle. - Gauge
Style - The concrete types conforming to
SwiftUI.GaugeStyle. - Geometry
Properties - A member of
SwiftUI.MatchedGeometryProperties. - Gesture
Mask SwiftUI.GestureMask— which gestures still get a look in.- Glass
SwiftUI.Glass— which Liquid Glass variant an effect uses.- Glass
Effect Transition SwiftUI.GlassEffectTransition.- Gradient
Color Space SwiftUI.Gradient.ColorSpace— which space a gradient interpolates in.- Grid
Track - One track of a
LazyVGrid’s columns or aLazyHGrid’s rows. - Group
BoxStyle - The concrete types conforming to
SwiftUI.GroupBoxStyle. - Hand
Gesture Shortcut SwiftUI.HandGestureShortcut.- Hashable
Kind - A
Hashabletype, named rather than carried. - Hashable
Value - A value to pass where SwiftUI asks for
some Hashable. - Heading
Level SwiftUI.AccessibilityHeadingLevel, a frozen enum that fits in a register.- Hierarchical
- Which of the five hierarchical levels a style names.
- Horizontal
Alignment SwiftUI.HorizontalAlignment, a frozen word-sized value.- Horizontal
Edge SwiftUI.HorizontalEdge.- Hover
Phase - Which phase of a continuous hover SwiftUI is reporting.
- Image
Scale SwiftUI.Image.Scale.- Insettable
Shape - The concrete types conforming to
SwiftUI.InsettableShape. - Interface
Orientation SwiftUI.InterfaceOrientation.- Interpolation
Image.Interpolation— how a scaled image is resampled.- Key
- A named key, as
SwiftUI.KeyEquivalent’s statics spell it. - KeyPress
Phases - Which phases of a key press to observe.
- KeyPress
Result - Whether a key press was consumed.
- Keyboard
Shortcut SwiftUI.KeyboardShortcut.- Label
Style - The concrete types conforming to
SwiftUI.LabelStyle. - Labeled
Content Style - The concrete types conforming to
SwiftUI.LabeledContentStyle. - Labeled
Pair Role SwiftUI.AccessibilityLabeledPairRole.- Layout
Direction SwiftUI.LayoutDirection, in declaration order.- Layout
Direction Behavior SwiftUI.LayoutDirectionBehavior.- Line
Height Kind - A line height, as
AttributedString.LineHeight’s statics name it. - Line
Pattern - A member of
SwiftUI.Text.LineStyle.Pattern. - List
Item Tint - Which
ListItemTinta row uses. - List
Style - The concrete types conforming to
SwiftUI.ListStyle. - Material
Active Appearance SwiftUI.MaterialActiveAppearance.- Material
Kind - The blur materials SwiftUI exposes as
ShapeStyles. - Menu
Action Dismiss Behavior SwiftUI.MenuActionDismissBehavior.- Menu
Button Style - The concrete types conforming to
SwiftUI.MenuButtonStyle. - Menu
Order SwiftUI.MenuOrder.- Menu
Style - The concrete types conforming to
SwiftUI.MenuStyle. - Orientation
- A member of
SwiftUI.InterfaceOrientation—table’s row type. - Palette
Selection Effect SwiftUI.PaletteSelectionEffect.- Picker
Style - The concrete types conforming to
SwiftUI.PickerStyle. - Pointer
Style - A member of
SwiftUI.PointerStyle. - Presentation
Adaptation SwiftUI.PresentationAdaptation.- Presentation
Background Interaction SwiftUI.PresentationBackgroundInteraction.- Presentation
Content Interaction SwiftUI.PresentationContentInteraction.- Presentation
Detent - Which detent a sheet may rest at.
- Preview
Layout SwiftUI.PreviewLayout’s cases without payloads.- Progress
Style - Which
ProgressViewStyleto apply. - Prominence
SwiftUI.Prominence, in declaration order.- Redaction
Reasons SwiftUI.RedactionReasons.- Resizing
Mode Image.ResizingMode.- Safe
Area Regions SwiftUI.SafeAreaRegions.- Scene
Padding SwiftUI.ScenePadding.- Scroll
Anchor Role SwiftUI.ScrollAnchorRole.- Scroll
Bounce Behavior SwiftUI.ScrollBounceBehavior.- Scroll
Dismisses Keyboard Mode SwiftUI.ScrollDismissesKeyboardMode.- Scroll
Edge Effect Style SwiftUI.ScrollEdgeEffectStyle.- Scroll
Indicator Visibility SwiftUI.ScrollIndicatorVisibility.- Scroll
Target Behavior - The concrete types conforming to
SwiftUI.ScrollTargetBehavior. - Scroll
Transition Configuration - How a scroll transition interpolates.
- Search
Field Placement - Where a search field is placed in the surrounding chrome.
- Search
Presentation Toolbar Behavior SwiftUI.SearchPresentationToolbarBehavior.- Search
Suggestions Placement Set SwiftUI.SearchSuggestionsPlacement.Set, an option set.- Search
Toolbar Behavior SwiftUI.SearchToolbarBehavior.- Sensory
Feedback - A haptic or audible cue.
- Shape
Style - The concrete types conforming to
SwiftUI.ShapeStyle. - Split
View Style - Which
NavigationSplitViewStyleto apply. - Spring
Loading Behavior SwiftUI.SpringLoadingBehavior.- Submit
Label SwiftUI.SubmitLabel.- Submit
Trigger - A member of
SwiftUI.SubmitTriggers. - Symbol
Color Rendering - How a multicolour symbol’s colours are rendered.
- Symbol
Effect - One of the indefinite symbol effects — the ones
.symbolEffect(_:)takes with novalue:, which run until the view goes away. - Symbol
Rendering Mode - A member of
SwiftUI.SymbolRenderingMode. - Symbol
Variable Value - How a symbol shows a variable value.
- Symbol
Variants SwiftUI.SymbolVariants.- System
Color - One of SwiftUI’s own named colours.
- TabBar
Minimize Behavior SwiftUI.TabBarMinimizeBehavior.- TabSearch
Activation - Which of
TabSearchActivation’s cases a tab view’s search uses. - TabStyle
- Which
TabViewStyleto apply. - Table
Style - The concrete types conforming to
SwiftUI.TableStyle. - Task
Priority - How urgently a
taskshould run..mediumis deliberately absent. The stdlib marks it@_alwaysEmitIntoClient, so unlike its neighbours it has no symbol to call —dlsymreturns null for$sScP6mediumScPvgZeven withlibswift_Concurrencyloaded, and naming it could only panic. - Template
Rendering Mode Image.TemplateRenderingMode.- Text
Align SwiftUI.TextAlignment, in declaration order.- Text
Case SwiftUI.Text.Case.- Text
Content Kind - A member of
AppKit’sNSTextContentType. - Text
Content Type - A member of
SwiftUI.AccessibilityTextContentType. - Text
Editor Style - The concrete types conforming to
SwiftUI.TextEditorStyle. - Text
Field Style - The concrete types conforming to
SwiftUI.TextFieldStyle. - Text
Input Formatting Control Placement Set SwiftUI.TextInputFormattingControlPlacement.Set, an option set.- Text
Part - One piece of an interpolated
Text. - Text
Scale SwiftUI.Text.Scale.- Text
Selectability - The concrete types conforming to
SwiftUI.TextSelectability. - Text
Selection Affinity SwiftUI.TextSelectionAffinity, in declaration order.- Text
Style SwiftUI.Font.TextStylepresets, reached through their static getters.- Toggle
Style - The concrete types conforming to
SwiftUI.ToggleStyle. - Toolbar
Item Placement SwiftUI.ToolbarItemPlacement— where a toolbar item goes.- Toolbar
Placement - A member of
SwiftUI.ToolbarPlacement. - Toolbar
Role SwiftUI.ToolbarRole.- Toolbar
Title Display Mode SwiftUI.ToolbarTitleDisplayMode.- Touch
BarItem Presence SwiftUI.TouchBarItemPresence, in declaration order.- Transition
Phase - Where in a transition
bodyis being asked to draw. - Truncation
Mode SwiftUI.Text.TruncationMode.- Typesetting
Language SwiftUI.TypesettingLanguage.- Vertical
Alignment SwiftUI.VerticalAlignment, a frozen word-sized value.- Vertical
Edge SwiftUI.VerticalEdge.- Vertical
Edge Set SwiftUI.VerticalEdge.Set, an option set.- Visibility
SwiftUI.Visibility, in declaration order.- Weight
SwiftUI.Font.Weight. The values are Doubles behind the scenes; these are the named steps SwiftUI exposes.- Window
Interaction Behavior SwiftUI.WindowInteractionBehavior.- Window
Style - The concrete types conforming to
SwiftUI.WindowStyle. - Window
Toolbar Full Screen Visibility SwiftUI.WindowToolbarFullScreenVisibility.- Window
Toolbar Style - The concrete types conforming to
SwiftUI.WindowToolbarStyle. - Writing
Direction Strategy - A member of
SwiftUI.Text.WritingDirectionStrategy. - Writing
Tools Behavior SwiftUI.WritingToolsBehavior.
Traits§
- Animating
- A timing curve written in Rust.
- Button
Styling - How a button draws.
- ForEach
Range ForEach(0..<count) { index in … }.- Gesture
Data - What a gesture hands its handlers, as a Rust type.
- Interpolatable
- Anything that can be interpolated into a
text_interpolated. - Into
Hashable - Anything that can stand where SwiftUI wants
some Hashable. - Into
KeyValue - What a key’s default may be written as.
- KeyValue
- A Swift type a synthesised key can hold.
- Label
Styling - How a label draws.
- Layout
Algorithm - A layout algorithm.
- Modifying
- How a view modifier draws.
- Representing
- How an AppKit view is made and kept up to date.
- Shaping
- How a shape draws itself into a rect.
- Transitioning
- How a transition draws in each phase.
Functions§
- accent_
color - Apply
.accentColor(_:). - accessibility_
action - Apply
.accessibilityAction(_:_:). - accessibility_
actions - Apply
.accessibilityActions(category:_:). - accessibility_
activation_ point - Apply
.accessibilityActivationPoint(_:). - accessibility_
add_ traits - Apply
.accessibilityAddTraits(_:). - accessibility_
adjustable_ action - Apply
.accessibilityAdjustableAction(_:). - accessibility_
chart_ descriptor - Apply
.accessibilityChartDescriptor(_:)with a synthesized representable. - accessibility_
children - Apply
.accessibilityChildren(children:). - accessibility_
custom_ content - Apply
.accessibilityCustomContent(_:_:importance:). - accessibility_
default_ focus - Apply
.accessibilityDefaultFocus(_:_:). - accessibility_
deprecated_ identifier - Apply
.accessibility(identifier:), the pre-accessibilityIdentifiername. - accessibility_
direct_ touch - Apply
.accessibilityDirectTouch(_:options:). - accessibility_
drag_ point - Apply
.accessibilityDragPoint(_:description:isEnabled:). - accessibility_
drop_ point - Apply
.accessibilityDropPoint(_:description:isEnabled:). - accessibility_
element - Apply
.accessibilityElement(_:). - accessibility_
focused - Apply
.accessibilityFocused(_:). - accessibility_
heading - Apply
.accessibilityHeading(_:). - accessibility_
hidden - Apply
.accessibilityHidden(_:). - accessibility_
hint - Apply
.accessibilityHint(_:). - accessibility_
identifier - Apply
.accessibilityIdentifier(_:). - accessibility_
ignores_ invert_ colors - Apply
.accessibilityIgnoresInvertColors(_:). - accessibility_
input_ labels - accessibility_
label - Apply
.accessibilityLabel(_:). - accessibility_
labeled_ pair - Apply
.accessibilityLabeledPair(role:id:in:). - accessibility_
linked_ group - Apply
.accessibilityLinkedGroup(id:in:). - accessibility_
remove_ traits - Apply
.accessibilityRemoveTraits(_:). - accessibility_
representation - Apply
.accessibilityRepresentation(representation:). - accessibility_
responds_ to_ user_ interaction - Apply
.accessibilityRespondsToUserInteraction(_:). - accessibility_
rotor - Apply
.accessibilityRotor(_:textRanges:). - accessibility_
rotor_ entry - Apply
.accessibilityRotorEntry(id:in:). - accessibility_
scroll_ action - Apply
.accessibilityScrollAction(_:). - accessibility_
scroll_ status - Apply
.accessibilityScrollStatus(_:isEnabled:). - accessibility_
selection_ identifier .accessibility(selectionIdentifier:)— which item of a selectable group this is, for assistive technologies.- accessibility_
shows_ large_ content_ viewer - Apply
.accessibilityShowsLargeContentViewer(_:). - accessibility_
sort_ priority - Apply
.accessibilitySortPriority(_:). - accessibility_
text_ content_ type - Apply
.accessibilityTextContentType(_:). - accessibility_
value - Apply
.accessibilityValue(_:isEnabled:). - accessibility_
zoom_ action - Apply
.accessibilityZoomAction(_:). - alert
alertwith a fixed flag. It cannot be dismissed: SwiftUI treats aBinding.constantas read-only, so the presentation has no way to writefalseback. Usealert_boundfor one the user can close.- alert_
bound alertbound to Rust state, so dismissing it writesfalseback.- alert_
message alert(_:isPresented:actions:message:)with a fixed flag, which cannot be dismissed — seealert.- alert_
message_ bound alert(_:isPresented:actions:message:)bound to Rust state.- alignment_
guide - Apply
.alignmentGuide(_:computeValue:). - allowed_
dynamic_ range - Apply
.allowedDynamicRange(_:). - allowed_
dynamic_ range_ high .allowedDynamicRange(.high)on anyView— inlines toenvironment(\.allowedDynamicRange, range).- allows_
hit_ testing - Apply
.allowsHitTesting(_:). - allows_
tightening - Apply
.allowsTightening(_:). - allows_
window_ activation_ events - Apply
.allowsWindowActivationEvents(_:). - alternating_
row_ backgrounds - Apply
.alternatingRowBackgrounds(_:). - anchor_
preference - Apply
.anchorPreference(key:value:transform:)with a synthesized key. - angular_
gradient_ style AngularGradient(gradient:center:angle:)— a sweep around a point.- animation
- Apply
.animation(.default, value:). - animation_
fn - Register a timing curve. A closure from time to progress is one.
- animation_
kind .animation(_:value:)with the curve named.- apply_
modifier ⚠ - Apply a
ViewModifiervalue to a view. - aspect_
ratio - Apply
.aspectRatio(_:contentMode:).fitis case 0,fillis case 1. - aspect_
ratio_ content_ mode .aspectRatio(_:contentMode:)with the mode named rather than spelled as abool.- aspect_
ratio_ mode - Apply
.aspectRatio(contentMode:)— the spelling with no ratio. - assistive_
access_ navigation_ icon - Apply
.assistiveAccessNavigationIcon(_:). - async_
image AsyncImage(url:scale:)— theContent == Imageform.- attributed_
text_ formatting_ definition - Apply
.attributedTextFormattingDefinition(_:)withAttributeScopes.SwiftUIAttributes. - background
- Apply
.background(_:)with a Color. - background_
any_ gradient - Apply
.background(_:)with anAnyGradient— what.indigo.gradientis. - background_
content - Apply
.background(alignment:content:). - background_
extension_ effect - Apply
.backgroundExtensionEffect(_:). - background_
in_ circle - Apply
.background(in:fillStyle:)— the background style, clipped to a shape. - background_
linear_ gradient - Apply
.background(LinearGradient(colors:startPoint:endPoint:)). - background_
material - Apply
.background(_: Material)— the blur materials. - background_
preference_ value - Apply
.backgroundPreferenceValue(_:alignment:_:)with fixed content. - background_
radial_ gradient - Apply
.background(RadialGradient(colors:center:startRadius:endRadius:)). - background_
shape_ style - Apply
.backgroundStyle(_:). - background_
style_ color .backgroundStyle(_:)with aColor.- background_
style_ hierarchical .backgroundStyle(_:)with one of the hierarchical levels.- background_
style_ ⚠in_ insettable - Apply
.background(_:in:fillStyle:)where the shape isInsettableShape. - background_
style_ ⚠in_ shape - Apply
.background(_:in:fillStyle:)— a style drawn behind, in a shape. - background_
style_ ⚠of - Apply
.backgroundStyle(_:)with anyShapeStyle. - background_
style_ value .backgroundStyle(_:)with an already-resolvedColorword.- badge
- Apply
.badge(_:). - badge_
prominence - baseline_
offset - Apply
.baselineOffset(_:). - binding_
write ⚠ - Write through a
Binding<Bool>, exactly as a control does when the user interacts with it. Used to prove the write-back path end to end. Write through aBinding<T>the way a control does — SwiftUI’s ownwrappedValuesetter, reached through its dispatch thunk. - binding_
write_ bool - blend_
mode - Apply
.blendMode(_:). The cases followSwiftUI.BlendMode’s declaration order. - blur
- Apply
.blur(radius:). - bold
- Apply
.bold(). - bold_
text - Create a bold
Textatsizepoints (size <= 0keeps the default size). - bool_
binding - border
- Apply
.border(_:width:). Apply.border(_:width:)with colour components. - border_
value - Apply
.border(_:width:)with aColorthat is already built. - brightness
- Apply
.brightness(_:). - button
- Create a
Buttonwith a text label and an action. - button_
border_ shape - button_
labelled Button(action:label:)— a button whose label is a view rather than a string.- button_
raw - Create a
Buttonwith raw C callback. - button_
repeat_ behavior - button_
role Button(_:role:action:).- button_
sizing - button_
style - Apply
.buttonStyle(_:)to a subtree. - button_
style_ fn - Register a button style. A closure taking a
ButtonConfigurationis one. - button_
style_ glass_ clear - Apply
.buttonStyle(.glass(.clear)). - canvas
Canvas { context, size in … }with an empty renderer.- capsule
Capsule()—RoundedCornerStyle.circularis case 0.- circle
Circle()- clip_
capsule - Apply
.clipShape(Capsule()). - clip_
capsule_ styled .clipShape(Capsule(style:)).- clip_
circle - Apply
.clipShape(Circle()). - clip_
ellipse - Apply
.clipShape(Ellipse()). - clip_
rounded_ rect - Apply
.clipShape(RoundedRectangle(cornerRadius:)). - clip_
rounded_ rect_ styled - Apply
.clipShape(RoundedRectangle(cornerRadius:style:)). - clipped
- Apply
.clipped(). - color
- Create a
Colorview. - color_
exposure_ adjust Color.exposureAdjust(_:)— brighten or darken by stops.- color_
gradient Color.gradient— the colour as a gentle vertical gradient.- color_
headroom Color.headroom(_:)— the colour’s allowed brightness past white.- color_
invert - Apply
.colorInvert(_:). - color_
meta_ for_ style Color’s metadata andShapeStylewitness, for a call taking a style.- color_
mix Color.mix(with:by:)— blend two colours, perceptually.- color_
mix_ in Color.mix(with:by:in:)— the same blend in whichever space is named.- color_
multiply - Apply
.colorMultiply(_:). - color_
opacity Color.opacity(_:)— aColorwith its alpha scaled.- color_
picker - A
ColorPickershowing a fixed colour, which the user cannot change. Seecolor_picker_bound. - color_
picker_ bound - A
ColorPickerbound to Rust state. - color_
scheme - Apply
.colorScheme(_:). - color_
shadow_ style Color.shadow(_:)— the genericShapeStyle.shadow, withSelf == Color.- color_
shapestyle_ wt_ for_ style - See
color_meta_for_style. - color_
value_ of - The
Colorvalue behind a set of components. - color_
view - Create a view of a
Colorvalue that is already built. - compositing_
group - Apply
.compositingGroup(). - conditional
- The
if/elseaViewBuilderproduces. - confirmation_
dialog confirmation_dialogwith a fixed flag. It cannot be dismissed: SwiftUI treats aBinding.constantas read-only, so the presentation has no way to writefalseback. Useconfirmation_dialog_boundfor one the user can close.- confirmation_
dialog_ bound confirmation_dialogbound to Rust state, so dismissing it writesfalseback.- confirmation_
message confirmationDialog(…actions:message:)with a fixed flag, which cannot be dismissed — seeconfirmation_dialog.- confirmation_
message_ bound confirmationDialog(…actions:message:)bound to Rust state.- container_
background - Apply
.containerBackground(for:alignment:content:). - container_
corner_ offset - Apply
.containerCornerOffset(_:). - container_
key - Define a container-value key, or return the one already defined for
name. - container_
relative_ frame - Apply
.containerRelativeFrame(_:alignment:). - container_
relative_ frame_ thirds - Apply
.containerRelativeFrame(_:alignment:_:)with the documentation’s length function. - container_
shape - Apply
.containerShape(_:). - container_
value .containerValue(\.key, value)for a key defined here.- content_
margins - Apply
.contentMargins(_:). - content_
shape - Apply
.contentShape(_:eoFill:). - content_
transition - Apply
.contentTransition(_:). - content_
unavailable ContentUnavailableView(title, systemImage:description:)— the placeholder for an empty list, a failed search, a screen with nothing on it yet.- context_
menu - Apply
.contextMenu(menuItems:). - context_
menu_ preview .contextMenu(menuItems:preview:)— a menu with something to look at.- contrast
- Apply
.contrast(_:). - control_
group ControlGroup { … }- control_
group_ style - Apply
.controlGroupStyle(_:). - control_
size - Apply
.controlSize(_:). - coordinate_
space - Apply
.coordinateSpace(name:). - copyable
- Apply
.copyable(_:)with the strings to offer. - corner_
radius - Apply
.cornerRadius(_:). - custom_
animation .animation(Animation(curve), value:)with a curve written in Rust.- custom_
button_ style .buttonStyle(_:)with a style written in Rust.- custom_
font ⚠ - Build
Font.custom(_:size:). - custom_
label_ style .labelStyle(_:)with a style written in Rust.- custom_
layout MyLayout { … }— the layout, given children.- custom_
modifier .modifier(_:)with a modifier written in Rust.- custom_
shape - A shape written in Rust, as a view.
- custom_
shape_ value - The shape as one of the crate’s
super::Shapevalues. - custom_
transition .transition(_:)with a transition written in Rust.- cuttable
- Apply
.cuttable(for:action:)with the strings to offer. - date_
picker - A
DatePickershowing a fixed date, which the user cannot change. Seedate_picker_bound. - date_
picker_ bound - A
DatePickerbound to Rust state, held as aDate’s seconds-since-2001. - date_
picker_ bound_ components - As
date_picker_bound, showing the named components. - date_
picker_ components_ shown - As
date_picker, showing the named components. - date_
picker_ range DatePicker(_:selection:in:displayedComponents:)— a date picker with bounds.- date_
picker_ range_ components - As
date_picker_range, showing the named components. - date_
picker_ style - Apply
.datePickerStyle(_:). - default_
app_ storage_ standard - Apply
.defaultAppStorage(_:)withUserDefaults.standard. - default_
app_ storage_ suite - Apply
.defaultAppStorage(_:)with a named suite. - default_
focus - Apply
.defaultFocus(_:_:priority:)withA == Bool. - default_
scroll_ anchor - Apply
.defaultScrollAnchor(_:for:). - delete_
disabled - Apply
.deleteDisabled(_:). - dialog_
icon - Apply
.dialogIcon(_:). - dialog_
prevents_ app_ termination - Apply
.dialogPreventsAppTermination(_:). - dialog_
severity - dialog_
suppression_ toggle - Apply
.dialogSuppressionToggle(isSuppressed:). - dialog_
suppression_ toggle_ labelled - Apply
.dialogSuppressionToggle(_:isSuppressed:)with a label. - disable_
autocorrection - Apply
.disableAutocorrection(_:). - disabled
- Apply
.disabled(_:). - disclosure_
group DisclosureGroup(_:content:).- disclosure_
group_ style - Apply
.disclosureGroupStyle(_:). - dismissal_
confirmation_ dialog - Apply
.dismissalConfirmationDialog(_:shouldPresent:actions:message:). - divider
- Create a
Divider. - drag
DragGesture(minimumDistance:coordinateSpace: .local).- drag_
configuration - Apply
.dragConfiguration(_:). - drag_
container - Apply
.dragContainer(for:in:_:)withItem == String. - drag_
container_ selection - Apply
.dragContainerSelection(_:containerNamespace:)with the selection. - drag_
gesture - Attach a
DragGesture. - drag_
previews_ formation - draggable_
container_ item - Apply
.draggable(containerItemID:containerNamespace:). - draggable_
text - Apply
.draggable(_:)with aStringpayload. - drawing_
group - Apply
.drawingGroup()— render the subtree offscreen through Metal. - drop_
configuration - Apply
.dropConfiguration(_:). - drop_
destination - Apply
.dropDestination(for:action:isTargeted:). - drop_
previews_ formation - dump_
value - A full recursive description of the value a handle holds, as Swift’s own
dumpwrites it. - dump_
value_ to_ depth dump_valuewith an explicit depth limit.- dynamic_
type_ name - The Swift type of the view a handle wraps, as the runtime spells it.
- dynamic_
type_ size - Apply
.dynamicTypeSize(_:). - edges_
ignoring_ safe_ area - Apply
.edgesIgnoringSafeArea(_:). - ellipse
Ellipse()- elliptical_
gradient_ style EllipticalGradient(colors:center:startRadiusFraction:endRadiusFraction:).- empty_
view - Create an
EmptyView. - env_key
- Define an environment key, or return the one already defined for
name. - environment_
image_ scale - Apply
.environment(_:_:)for\EnvironmentValues.imageScale. - environment_
object - Apply
.environmentObject(_:). - environment_
reader - A view whose content is a function of the environment.
- environment_
symbol_ variants - Apply
.environment(\.symbolVariants, _). - environment_
value .environment(\.key, value)for a key defined here.- equatable
.equatable()— wrap a view inEquatableView, whatever its type.- equatable_
text Text(verbatim:).equatable()— anEquatableView<Text>.- exportable_
to_ services - Apply
.exportableToServices(_:)with the strings to export. - exports_
item_ providers - Apply
.exportsItemProviders(_:onExport:onEdit:). - f64_
binding - Build a
Binding<Double>backed by Rust state. - file_
dialog_ browser_ options - file_
dialog_ confirmation_ label - Apply
.fileDialogConfirmationLabel(_:). - file_
dialog_ customization_ id - Apply
.fileDialogCustomizationID(_:). - file_
dialog_ default_ directory - Apply
.fileDialogDefaultDirectory(_:). - file_
dialog_ imports_ unresolved_ aliases - Apply
.fileDialogImportsUnresolvedAliases(_:). - file_
dialog_ message - Apply
.fileDialogMessage(_:). - file_
dialog_ url_ enabled - Apply
.fileDialogURLEnabled(_:). - file_
exporter - Apply
.fileExporter(isPresented:item:contentTypes:defaultFilename:onCompletion:onCancellation:)withItem == String. - file_
exporter_ filename_ label - Apply
.fileExporterFilenameLabel(_:). - file_
importer - Apply
.fileImporter(isPresented:allowedContentTypes:onCompletion:). - file_
mover - Apply
.fileMover(isPresented:file:onCompletion:). - fill_
then_ stroke .fill(_:).stroke(_:lineWidth:)— a shape filled, then outlined.- fill_
then_ stroke_ border .fill(_:).strokeBorder(_:style:)— a shape filled, then bordered inside its own edge.- find_
disabled - Apply
.findDisabled(_:). - find_
navigator - Apply
.findNavigator(isPresented:). - fixed_
size - Apply
.fixedSize(horizontal:vertical:). - flips_
for_ right_ to_ left_ layout_ direction - Apply
.flipsForRightToLeftLayoutDirection(_:). - focus_
effect_ disabled - Apply
.focusEffectDisabled(_:). - focus_
key - Register a focused-value key, or return the one already registered for
name. - focus_
scope - Apply
.focusScope(_:). - focus_
section - Apply
.focusSection(_:). - focusable
- Apply
.focusable(_:). - focused
- Apply
.focused(_:). - focused_
object - Apply
.focusedObject(_:). - focused_
on - Apply
.focused(_:)with a real, installed@FocusState. - focused_
scene_ object - Apply
.focusedSceneObject(_:). - focused_
scene_ value .focusedSceneValue(keyPath, value)— publish a value for the whole scene.- focused_
value - Apply
.focusedValue(_:)with anObservableobject. - focused_
value_ keyed .focusedValue(keyPath, value)— publish a value for the focused view.- font
- Apply
.font(.system(size:weight:)). - font_
apply - Apply an already-built raw
Fontvalue with.font(_:). - font_
custom - Apply
.font(.custom(_:size:)). - font_
design - Apply
.fontDesign(_:). - font_
ref - Apply a prebuilt
Fontwith.font(_:). - font_
size - Apply
.font(.system(size:)). - font_
system - Apply
.font(.system(size:weight:design:)). - font_
text_ style - Apply
.font(_:)with one of the built-in text styles. - font_
weight - Apply
.fontWeight(_:). - font_
width - Apply
.fontWidth(_:). - for_
each ForEachover a range of indices.- for_
each_ closed ForEach(a...b, id: \.self) { … }— a closed range, identified by value.- for_
each_ items ForEachover any Rust collection.- foreground_
color - Apply
.foregroundColor(_:). - foreground_
color_ value - Apply
.foregroundColor(_:), the deprecated environment-writing one. - foreground_
style_ color - Apply
.foregroundStyle(_:)with a colour. - foreground_
style_ hierarchical - Apply
.foregroundStyle(.linearGradient(colors:startPoint:endPoint:)). - foreground_
style_ linear_ gradient - foreground_
style_ ⚠of - Apply
.foregroundStyle(_:)with anyShapeStyle. - foreground_
style_ pair - Apply
.foregroundStyle(_:_:)— a primary and a secondary style. - foreground_
style_ triple - Apply
.foregroundStyle(_:_:_:)— three styles. - foreground_
style_ value - Apply
.foregroundStyle(_:)to aColorthat is already built. - form
Form { … }.- form_
style - Apply
.formStyle(_:). - frame
- Apply
.frame(width:height:), centred. - frame_
aligned - Apply
.frame(width:height:alignment:). - frame_
max_ infinity - Apply
.frame(maxWidth:maxHeight:alignment:)with.infinityfor both. - frame_
max_ width - Apply
.frame(maxWidth: .infinity)— the width only. - frame_
optional - Apply
.frame(width:height:alignment:)with either dimension left out. - gauge
Gauge(value:in:label:).- gauge_
style - Apply
.gaugeStyle(_:). - geometry_
group .geometryGroup()— inlines tomodifier(_GeometryGroupEffect()).- geometry_
reader GeometryReader { size in … }.- gesture
.gesture(_:including:).- glass_
effect - Apply
.glassEffect()— Liquid Glass, in its default shape. - glass_
effect_ id - Apply
.glassEffectID(_:in:). - glass_
effect_ kind - The same, with the variant named.
- glass_
effect_ transition - glass_
effect_ union - Apply
.glassEffectUnion(id:namespace:). - gradient_
color_ space - The same, in whichever space is named.
- gradient_
color_ space_ perceptual Gradient.colorSpace(_:)— the gradient interpolated in another space.- grayscale
- Apply
.grayscale(_:). - grid
Grid { … }overGridRowchildren.- grid_
cell_ anchor - Apply
.gridCellAnchor(_:). - grid_
cell_ columns - Apply
.gridCellColumns(_:). - grid_
cell_ unsized_ axes - Apply
.gridCellUnsizedAxes(_:). - grid_
column_ alignment - Apply
.gridColumnAlignment(_:). - grid_
row GridRow { … }over N children.- grid_
row_ aligned GridRow(alignment:) { … }— how this row’s cells sit against each other vertically, overriding the grid’s ownalignmentfor this row only.- group
Group { … }— a container that groups without laying out.- group_
box GroupBox { … }.- group_
box_ style - Apply
.groupBoxStyle(_:). - hand_
gesture_ shortcut - Apply
.handGestureShortcut(_:). - handle_
word - The handle as a raw
+1AnyViewword. - handles_
external_ events - Apply
.handlesExternalEvents(preferring:allowing:). - header_
prominence - Apply
.headerProminence(_:). - help
- Apply
.help(_:). - help_
text - Apply
.help(_:). - hidden
- Apply
.hidden(). - hierarchical_
style HierarchicalShapeStyle.primaryand friends, as aShapeStyle.- high_
priority_ gesture - Apply
.highPriorityGesture(_:including:)with aDragGesture. - high_
priority_ gesture_ of .highPriorityGesture(_:including:)— this gesture wins over the view’s own.- horizontal_
radio_ group_ layout - Apply
.horizontalRadioGroupLayout(_:). - hsplit_
view HSplitView { content }— a draggable divider between side-by-side panes.- hstack
HStackfrom children.- hstack_
aligned HStack(alignment:)from children.- hstack_
aligned_ spacing HStack(alignment:spacing:)from children.- hstack_
spacing HStack(spacing:)from children.- hue_
rotation - Apply
.hueRotation(_:), in radians. - i64_
binding - id
- Apply
.id(_:). - ignores_
safe_ area - Apply
.ignoresSafeArea(_:). - image_
named - Build a
SwiftUI.Imagefrom a named asset in the main bundle. - image_
scale - Apply
.imageScale(_:). - image_
system - Build a
SwiftUI.Imagefrom an SF Symbol name. - implicit_
blend_ mode_ style ShapeStyle.blendMode(_:)— the current foreground style, blended.- implicit_
opacity_ style ShapeStyle.opacity(_:)— the current foreground style, faded.- implicit_
shadow_ style .shadow(_:)applied to the implicit foreground style.- importable_
from_ services - Apply
.importableFromServices(for:action:). - imports_
item_ providers - Apply
.importsItemProviders(_:onImport:). - inspector
- Apply
.inspector(isPresented:content:). - inspector_
column_ width - Apply
.inspectorColumnWidth(_:). - inspector_
column_ width_ range - Apply
.inspectorColumnWidth(min:ideal:max:)— a width the user can drag within. - interaction_
activity_ tracking_ tag - Apply
.interactionActivityTrackingTag(_:). - interactive_
dismiss_ disabled - Apply
.interactiveDismissDisabled(_:). - invalidatable_
content - Apply
.invalidatableContent(_:). - italic
- Apply
.italic(). - item_
provider - Apply
.itemProvider(_:)with a provider carryingitem. - kerning
- Apply
.kerning(_:). - keyboard_
shortcut - keyframe_
animator - Apply
.keyframeAnimator(initialValue:repeating:content:keyframes:). - label
- Create a
Label(_:systemImage:). - label_
icon_ to_ title_ spacing - Apply
.labelIconToTitleSpacing(_:). - label_
reserved_ icon_ width - Apply
.labelReservedIconWidth(_:). - label_
style - Apply
.labelStyle(_:). - label_
style_ fn - Register a label style.
- labeled_
content_ style - Apply
.labeledContentStyle(_:). - labels_
hidden - Apply
.labelsHidden(_:). - labels_
visibility - Apply
.labelsVisibility(_:). - layout
- Build a layout from a sizing pass and a placement pass.
- layout_
direction_ behavior - layout_
priority - Apply
.layoutPriority(_:). - layout_
value_ int - Apply
.layoutValue(key:value:)with a runtime-synthesized key. - lazy_
hgrid LazyHGrid(rows:) { … }— children flowed across the named rows.- lazy_
hstack LazyHStackfrom children.- lazy_
hstack_ aligned LazyHStack(alignment:)from children.- lazy_
vgrid LazyVGrid(columns:) { … }— children flowed down the named columns.- lazy_
vstack LazyVStackfrom children.- lazy_
vstack_ aligned LazyVStack(alignment:)from children.- line_
height - Apply
.lineHeight(_:). - line_
limit - Apply
.lineLimit(_:). - line_
spacing - Apply
.lineSpacing(_:). - linear_
gradient_ stops - A
LinearGradientbuilt from explicitGradient.Stops. - linear_
gradient_ stops_ view - A
LinearGradientas a view, for.mask { … }and friends. - linear_
gradient_ style - Build a
LinearGradientvalue, with its metadata andShapeStylewitness. - linear_
gradient_ style_ of - As
linear_gradient_style, fromColorvalues that are already built. - link
Link(_:destination:)— a label that opens a URL.- list
List { … }with static content.- list_
identified List(ids, id: \.self) { id in … }— rows SwiftUI identifies by value.- list_
identified_ str List(names, id: \.self) { name in … }— the same, keyed byString.- list_
item_ tint - Apply
.listItemTint(_:). - list_
item_ tint_ monochrome - Apply
.listItemTint(_:)with the monochrome tint or none. - list_
row_ background - Apply
.listRowBackground(_:). - list_
row_ insets - Apply
.listRowInsets(_:). - list_
row_ separator - Apply
.listRowSeparator(_:). - list_
row_ separator_ tint - Apply
.listRowSeparatorTint(_:edges:). - list_
section_ separator - Apply
.listSectionSeparator(_:). - list_
section_ separator_ tint - Apply
.listSectionSeparatorTint(_:edges:). - list_
style - Apply
.listStyle(_:). - locale_
language_ thai Locale.Language(languageCode: .thai).- long_
press LongPressGesture(minimumDuration:maximumDistance:).- long_
press_ gesture - Attach a
LongPressGesturewith.gesture(_:including:). - luminance_
to_ alpha - Apply
.luminanceToAlpha(_:). - magnify
MagnifyGesture(minimumScaleDelta:).- magnify_
gesture - Attach a
MagnifyGesture. - mask
- Apply
.mask(alignment: .center) { content }. - mask_
aligned - Apply
.mask(alignment:_:). - mask_
plain .mask(_:)— the alignment-free overload, which builds a_MaskEffect.- matched_
geometry_ effect - Apply
.matchedGeometryEffect(id:in:properties:anchor:isSource:). - matched_
geometry_ effect_ in - Apply
.matchedGeometryEffect(id:in:properties:anchor:isSource:)in a shared namespace. - matched_
transition_ source - Apply
.matchedTransitionSource(id:in:). - material_
active_ appearance - material_
parts - A
Material’s value, metadata andShapeStylewitness. - menu
Menu(_:content:).- menu_
action_ dismiss_ behavior - menu_
button_ style - Apply
.menuButtonStyle(_:). - menu_
indicator - Apply
.menuIndicator(_:). - menu_
order - menu_
style - Apply
.menuStyle(_:). - meta_of
- Declare a Rust enum mirroring a Swift type’s
staticmembers. - minimum_
scale_ factor - Apply
.minimumScaleFactor(_:). - modifier_
fn - Register a view modifier. A closure taking the content is one.
- modifier_
key_ alternate - Apply
.modifierKeyAlternate(_:_:). - monospaced
- Apply
.monospaced(). - monospaced_
digit - Apply
.monospacedDigit(_:). - move_
disabled - Apply
.moveDisabled(_:). - multiline_
alignment - Apply
.multilineTextAlignment(_:). - namespace_
id ⚠ - A fresh
Namespace.ID— what@Namespaceproduces. - navigation_
bar_ back_ button_ hidden - Apply
.navigationBarBackButtonHidden(_:). - navigation_
destination - Apply
.navigationDestination(isPresented:destination:). - navigation_
destination_ for .navigationDestination(for: Int.self) { value in … }— value-based routing.- navigation_
document - Apply
.navigationDocument(_:)with aTransferableitem. - navigation_
document_ url - Apply
.navigationDocument(_:)with aURL. - navigation_
link NavigationLink(_:destination:).- navigation_
link_ labelled NavigationLink(destination:) { label }— a link whose label is a view.- navigation_
split_ view NavigationSplitView { sidebar } detail: { detail }.- navigation_
split_ view3 .navigationSplitViewStyle(.automatic)NavigationSplitView { sidebar } content: { content } detail: { detail }.- navigation_
split_ view_ column_ width .navigationSplitViewColumnWidth(_:)— oneCGFloat, so d0 and nothing else.- navigation_
split_ view_ style - Apply
.navigationSplitViewStyle(_:). - navigation_
split_ view_ style_ automatic - navigation_
stack NavigationStack { … }.- navigation_
subtitle - Apply
.navigationSubtitle(_:). - navigation_
subtitle_ text - Apply
.navigationSubtitle(_:). - navigation_
title - Apply
.navigationTitle(_:). - navigation_
title_ bound - Apply
.navigationTitle(_:)with aBinding<String>— an editable title. - navigation_
transition - Apply
.navigationTransition(_:)with the automatic transition. - navigation_
view_ style_ automatic .navigationViewStyle(.automatic)- navigation_
view_ style_ columns .navigationViewStyle(.columns)— the two-column split.- navigation_
view_ style_ double_ column .navigationViewStyle(.doubleColumn)— sidebar plus detail.- normalise_
dump - Remove the parts of a dump that legitimately differ between two runs.
- ns_
view_ fn - Register a representable from a maker and an updater.
- ns_
view_ representable - The representable as a view.
- observed_
preference - The last preference value
onPreferenceChangereported, if any. - offset
- Apply
.offset(x:y:). - on_
appear - Apply
.onAppear(perform:). - on_
change - Apply
.onChange(of:initial:_:), watching anInt. - on_
change_ bool - Apply
.onChange(of:initial:_:), watching aBool. - on_
change_ f64 - Apply
.onChange(of:initial:_:), watching aDouble. - on_
change_ str - Apply
.onChange(of:initial:_:), watching aString. - on_
command - Apply
.onCommand(_:perform:). - on_
continue_ user_ activity - Apply
.onContinueUserActivity(_:perform:). - on_
continuous_ hover - Apply
.onContinuousHover(coordinateSpace:perform:). - on_
copy_ command - Apply
.onCopyCommand(perform:), offering the given plain-text items. - on_
cut_ command - Apply
.onCutCommand(perform:), offering the given plain-text items. - on_
delete_ command - Apply
.onDeleteCommand(perform:). - on_
disappear - Apply
.onDisappear(perform:). - on_drag
- Apply
.onDrag(_:preview:). - on_
drag_ ended_ value - The same, with the value SwiftUI delivered.
- on_
drag_ gesture - Attach a
DragGesturewith anonEndedhandler. - on_
drag_ session_ updated - Apply
.onDragSessionUpdated(_:). - on_drop
- Apply
.onDrop(of:isTargeted:perform:). - on_
drop_ session_ updated - Apply
.onDropSessionUpdated(_:). - on_
exit_ command - Apply
.onExitCommand(perform:). - on_
geometry_ change_ f64 - Apply
.onGeometryChange(for: Double.self, of:action:). - on_
geometry_ change_ int - Apply
.onGeometryChange(for:of:action:). - on_
hover - Apply
.onHover(perform:). - on_
insert .onInsert(of:perform:)— accept a drop into aForEach’s rows.- on_
interactive_ resize_ change - Apply
.onInteractiveResizeChange(_:). - on_key
.onKeyPress(_:action:)— one named key, with noKeyPressto inspect.- on_
key_ press - Apply
.onKeyPress(characters:phases:action:). - on_
long_ press_ gesture - Apply
.onLongPressGesture(minimumDuration:maximumDistance:pressing:perform:). - on_
magnify_ ended - Attach a
MagnifyGesturewith anonEndedhandler. - on_
modifier_ keys_ changed - Apply
.onModifierKeysChanged(mask:initial:_:). - on_
move_ command - Apply
.onMoveCommand(perform:). - on_
open_ url - Apply
.onOpenURL(perform:). - on_
paste_ command - Apply
.onPasteCommand(of:perform:). - on_
pencil_ double_ tap - Apply
.onPencilDoubleTap(perform:). - on_
pencil_ squeeze - Apply
.onPencilSqueeze(perform:). - on_
preference_ change_ int - Apply
.onPreferenceChange(_:perform:), recording the value. - on_
receive - Apply
.onReceive(_:perform:)with aCombine.Empty<Int, Never>. - on_
rotate_ ended - Attach a
RotateGesturewith anonEndedhandler. - on_
scroll_ geometry_ change - Apply
.onScrollGeometryChange(for:prefersLast:of:action:). - on_
scroll_ geometry_ change_ f64 - Apply
.onScrollGeometryChange(for: Double.self, prefersLast:of:action:). - on_
scroll_ phase_ change - Apply
.onScrollPhaseChange(_:). - on_
scroll_ target_ visibility_ change - Apply
.onScrollTargetVisibilityChange(for:threshold:_:)withA == Int. - on_
scroll_ visibility_ change - Apply
.onScrollVisibilityChange(threshold:_:). - on_
submit - Apply
.onSubmit(of:_:). - on_
tap_ gesture - Apply
.onTapGesture(count:perform:). The action may capture, assuper::button’s may — a tap handler that cannot know which row it is on is one every list has to route around. - on_
write - Register what to do when a bound control writes.
- opacity
- Apply
.opacity(_:). - opacity_
of_ style .opacity(_:)applied to a style that is already built.- opacity_
over_ style .opacity(_:)applied to anyShapeStyle—_OpacityShapeStyle<Base>.- opaque_
result_ ⚠type - The concrete type behind a
-> some View, with itsViewwitness and size. - optional_
i64_ binding - Build a
Binding<Int>backed by Rust state. ABinding<Int?>over Rust state. - outline_
group OutlineGroup(root, id:children:content:)overIntnodes with no children.- overlay
- Apply
.overlay(alignment: .center) { content }. - overlay_
aligned - Apply
.overlay(alignment:content:). - overlay_
preference_ value - Apply
.overlayPreferenceValue(_:alignment:_:)with fixed content. - overlay_
style_ ⚠in_ shape - Apply
.overlay(_:in:fillStyle:)— a style drawn inside a shape. - padding
- Apply
.padding(_:). - padding_
default - Apply
.padding()— every edge, at whatever length the system picks. - padding_
edges - padding_
insets .padding(_: EdgeInsets)— a different inset per edge.- padding_
set - Apply
.padding(_:_:)— chosen edges, an explicit length. - palette_
selection_ effect - paste_
button PasteButton(supportedContentTypes:payloadAction:)— a button that pastes.- paste_
destination - Apply
.pasteDestination(for:action:validator:). - persistent_
system_ overlays - Apply
.persistentSystemOverlays(_:). - phase_
animator - Apply
.phaseAnimator(_:content:animation:)withPhase == Int. - picker
- A
Pickerwhose selection cannot change:Binding.constantis read-only. Usepicker_bound()for one the user can actually pick from. - picker_
bound - A
Pickerbound to Rust state: choosing writes the new index back. - picker_
style - Apply
.pickerStyle(_:). - pointer_
style - Apply
.pointerStyle(_:). - pointer_
visibility - Apply
.pointerVisibility(_:). - popover
popoverwith a fixed flag. It cannot be dismissed: SwiftUI treats aBinding.constantas read-only, so the presentation has no way to writefalseback. Usepopover_boundfor one the user can close.- popover_
anchored - Apply
.popover(isPresented:attachmentAnchor:arrowEdges:content:). - popover_
bound popoverbound to Rust state, so dismissing it writesfalseback.- position
- Apply
.position(_:). - preference_
int - Apply
.preference(key:value:)with a runtime-synthesized key. - preferred_
color_ scheme - Apply
.preferredColorScheme(_:)— light or dark for this subtree. - prefers_
default_ focus - Apply
.prefersDefaultFocus(_:in:). - presentation_
background - Apply
.presentationBackground(alignment:content:). - presentation_
background_ interaction - presentation_
compact_ adaptation - presentation_
content_ interaction - presentation_
corner_ radius - Apply
.presentationCornerRadius(_:). - presentation_
detents - Apply
.presentationDetents(_:). - presentation_
drag_ indicator - Apply
.presentationDragIndicator(_:). - presentation_
prevents_ app_ termination - Apply
.presentationPreventsAppTermination(_:). - presentation_
sizing - Apply
.presentationSizing(_:). - presented_
window_ style - Apply
.presentedWindowStyle(_:). - presented_
window_ toolbar_ style - Apply
.presentedWindowToolbarStyle(_:). - preview_
context - Apply
.previewContext(_:). - preview_
device - Apply
.previewDevice(_:). - preview_
display_ name - Apply
.previewDisplayName(_:). - preview_
interface_ orientation - preview_
layout - Apply
.previewLayout(_:). - privacy_
sensitive - Apply
.privacySensitive(_:). - progress
- Create a determinate
ProgressView. - progress_
indeterminate - Create an indeterminate
ProgressView— the spinner, with no value. - progress_
view_ style - Apply
.progressViewStyle(_:). - progress_
view_ style_ circular - Apply
.progressViewStyle(.circular). - projection_
effect - Apply
.projectionEffect(_:)with a 3×3 matrix in row-major order. - rectangle
Rectangle()- redacted
- Apply
.redacted(_:). - refreshable
- Apply
.refreshable(action:). - register
- Register any
LayoutAlgorithm, returning the handle SwiftUI stores. - rename_
action - Apply
.renameAction(_:). - rename_
button RenameButton()— the button a.renameActionputs in a context menu.- replace_
disabled - Apply
.replaceDisabled(_:). - rotate
RotateGesture(minimumAngleDelta:), taking degrees.- rotate_
gesture - Attach a
RotateGesture. The minimum delta is anAngle, i.e. radians. - rotation
- Apply
.rotationEffect(.degrees(_), anchor:). - rotation_
3d - Apply
.rotation3DEffect(_:axis:). - rounded_
rectangle RoundedRectangle(cornerRadius:), with the.continuousstyle Swift source gets when it leaves the style out.- rounded_
rectangle_ styled RoundedRectangle(cornerRadius:style:).- safe_
area_ bar - Apply
.safeAreaBar(edge:alignment:spacing:content:). - safe_
area_ inset - Apply
.safeAreaInset(edge:alignment:spacing:content:). - safe_
area_ padding .safeAreaPadding(_:)— inlines tomodifier(SafeAreaPaddingModifier(edges: .all, insets: EdgeInsets(_all:))).- saturation
- Apply
.saturation(_:). - scale
- Apply
.scaleEffect(_:anchor:). - scaled_
to_ fill - Apply
.scaledToFill(_:). - scaled_
to_ fit - Apply
.scaledToFit(_:). - scene_
padding - Apply
.scenePadding(_:). - scroll
- Wrap in a vertical
ScrollViewwith indicators shown. - scroll_
bounce_ behavior - Apply
.scrollBounceBehavior(_:). - scroll_
clip_ disabled - Apply
.scrollClipDisabled(_:). - scroll_
content_ background - Apply
.scrollContentBackground(_:). - scroll_
disabled - Apply
.scrollDisabled(_:). - scroll_
dismisses_ keyboard - scroll_
edge_ effect_ hidden - Apply
.scrollEdgeEffectHidden(_:). - scroll_
edge_ effect_ style - Apply
.scrollEdgeEffectStyle(_:for:). - scroll_
indicators - Apply
.scrollIndicators(_:). - scroll_
indicators_ flash - Apply
.scrollIndicatorsFlash(_:). - scroll_
position_ edge .scrollPosition(_:anchor:)— scroll to an edge, and stay bound to it.- scroll_
position_ id - Apply
.scrollPosition(id:anchor:). - scroll_
target_ behavior - Apply
.scrollTargetBehavior(_:). - scroll_
target_ layout - Apply
.scrollTargetLayout(_:). - scroll_
transition - Apply
.scrollTransition(_:axis:transition:). - scroll_
transition_ ends - Apply
.scrollTransition(topLeading:bottomTrailing:axis:transition:)— the two ends of the scroll configured separately. - scroll_
view_ reader ScrollViewReader { proxy in content }— a scroll view that can be scrolled from code.- search_
completion - Apply
.searchCompletion(_:). - search_
focused - Apply
.searchFocused(_:). - search_
presentation_ toolbar_ behavior - search_
scopes - Apply
.searchScopes(_:scopes:)withA == Int. - search_
selection - Apply
.searchSelection(_:). - search_
suggestions - Apply
.searchSuggestions(_:for:). - search_
toolbar_ behavior - searchable
- Apply
.searchable(text:isPresented:placement:prompt:). - section
Section(header:) { … }.- section_
actions - Apply
.sectionActions(content:). - section_
content Section { … }— no header, no footer.- section_
expanded Section(isExpanded:) { … } header: { … }— a section that collapses.- section_
footer Section(footer:) { … }— a footer with no header.- section_
header_ footer Section(header:footer:) { … }.- section_
index_ label .sectionIndexLabel(_:)— inlines through_traittomodifier(_TraitWritingModifier<SectionIndexLabelKey>(value:)).- securefield
- Create a
SecureFieldshowing a fixed string, which the user cannot edit. Seesecurefield_bound. - securefield_
bound - Create a
SecureFieldwired to Rust state — typing writes intostate. - selection_
disabled - Apply
.selectionDisabled(_:). - sensory_
feedback - Apply
.sensoryFeedback(_:trigger:condition:). - settings_
link SettingsLink()— a button that opens the app’sSettingsscene.- shadow
- Apply
.shadow(color:radius:x:y:). - shadow_
over_ style .shadow(_:)applied to anyShapeStyle—_ShadowShapeStyle<Base>.- shadow_
style - A
ShadowStyle—.drop(...)or.inner(...). - shape_
fn - Register a shape. A closure taking the path and the rect is one.
- share_
link_ url ShareLink(item:)for a URL.- sheet
sheetwith a fixed flag. It cannot be dismissed: SwiftUI treats aBinding.constantas read-only, so the presentation has no way to writefalseback. Usesheet_boundfor one the user can close.- sheet_
bound sheetbound to Rust state, so dismissing it writesfalseback.- sheet_
bound_ dismiss sheet(isPresented:onDismiss:content:)bound to Rust state, with a callback for the closing.- show_
window - Show a view in a native window and run the event loop.
- sign_
in_ with_ apple_ button SignInWithAppleButton(label, onRequest:onCompletion:).- sign_
in_ with_ apple_ button_ style .signInWithAppleButtonStyle(_:).- simultaneous_
gesture - Apply
.simultaneousGesture(_:including:)with aDragGesture. - simultaneous_
gesture_ of .simultaneousGesture(_:including:)— both this and the view’s own run.- slider
- Create a
Sliderover a closed range. - slider_
app_ storage Slider(value: $volume, in: lower...upper)over a real@AppStorage.- slider_
bound - A
Sliderwired to Rust state: it renders the current value and writes every drag straight back. - slider_
step_ bound - A
Sliderthat snaps to multiples ofstep. - slider_
thumb_ visibility - Apply
.sliderThumbVisibility(_:). - spacer
- Create a
Spacer. - speech_
adjusted_ pitch - Apply
.speechAdjustedPitch(_:). - speech_
always_ includes_ punctuation - Apply
.speechAlwaysIncludesPunctuation(_:). - speech_
announcements_ queued - Apply
.speechAnnouncementsQueued(_:). - speech_
spells_ out_ characters - Apply
.speechSpellsOutCharacters(_:). - spring_
loading_ behavior - stepper
- Create a
Stepperover a closed range. - stepper_
actions Stepper(_:onIncrement:onDecrement:)— a stepper driven by callbacks.- stepper_
app_ storage Stepper(label, value: $count, in: lower...upper, step:)over a real@AppStorage.- stepper_
bound - A
Stepperwired to Rust state:−and+write straight back. - strikethrough
- Apply
.strikethrough(_:pattern:color:). - stroke_
border .strokeBorder(_:lineWidth:antialiased:)on anInsettableShape.- styled_
text - Create a
Textwith font size, weight and colour applied. - submit_
label - submit_
scope - Apply
.submitScope(_:). - subscription_
view SubscriptionView(content:publisher:action:)—onReceiveas a view.- swipe_
actions - Apply
.swipeActions(edge:allowsFullSwipe:isPresented:content:). - symbol_
color_ rendering_ mode - Apply
.symbolColorRenderingMode(_:). - symbol_
color_ rendering_ mode_ flat .symbolColorRenderingMode(.flat)— inlines toenvironment(\.symbolColorRenderingMode, mode).- symbol_
effect .symbolEffect(_:)with any of the indefinite effects.- symbol_
effect_ pulse .symbolEffect(.pulse)— inlines tomodifier(_IndefiniteSymbolEffectModifier(effect:options:isActive:)).- symbol_
effects_ removed .symbolEffectsRemoved(_:)— inlines tomodifier(_SymbolEffectsRemovedModifier(isEnabled:)), oneBool.- symbol_
rendering_ mode - Apply
.symbolRenderingMode(_:). - symbol_
variable_ value_ mode - Apply
.symbolVariableValueMode(_:). - symbol_
variable_ value_ mode_ color .symbolVariableValueMode(.color)— inlines toenvironment(\.symbolVariableValueMode, mode).- symbol_
variant - system_
color - Create a view of one of SwiftUI’s named colours.
- system_
color_ value - The value behind one of SwiftUI’s named colours.
- system_
font_ ⚠full - Build
Font.system(size:weight:design:). - system_
image - Create an
Imagefrom an SF Symbol name. - tab
Tab("Home", systemImage: "house") { … }— one tab of a modernTabView.- tab_
bar_ minimize_ behavior - Apply
.tabBarMinimizeBehavior(_:). - tab_
item - Apply
.tabItem(_:). - tab_
view TabView { … }.- tab_
view_ customization .tabViewCustomization(_:)with a live customization, notnil.- tab_
view_ customization_ none .tabViewCustomization(nil).- tab_
view_ of TabView { Tab(…) }— the modern tab view, over one tab.- tab_
view_ search_ activation .tabViewSearchActivation(_:).- tab_
view_ search_ activation_ automatic .tabViewSearchActivation(.automatic)— a resilient struct, so by address.- tab_
view_ sidebar_ bottom_ bar .tabViewSidebarBottomBar { … }- tab_
view_ sidebar_ footer .tabViewSidebarFooter { … }- tab_
view_ sidebar_ header .tabViewSidebarHeader { … }- tab_
view_ style - Apply
.tabViewStyle(_:). - tab_
view_ style_ automatic .tabViewStyle(.automatic)- tab_
view_ tabs TabView { Tab(…); Tab(…); … }— the modern tab view over any number of tabs.- table
Table(rows) { TableColumn(title) { row in Text(cell) } }.- table_
column_ headers - Apply
.tableColumnHeaders(_:). - table_
style - Apply
.tableStyle(_:). - tag
- Apply
.tag(_:). - tap
TapGesture(count:).- task
- Apply
.task(id:priority:_:). - task_
once - Apply
.task { … }— the spelling with noid:. - text
- Create a
Textview. - text_
baseline_ offset Text.baselineOffset(_:)- text_
binding - Build a
Binding<Bool>over Rust state, for direct write-back testing. Build aBinding<String>backed by Rust state. - text_
bold Text.bold()— the one that returnsText.- text_
case - Apply
.textCase(_:). - text_
content_ type - Apply
.textContentType(_:). - text_
editor TextEditor(text:)— a multi-line editable field.- text_
editor_ style - Apply
.textEditorStyle(_:). - text_
field_ style - Apply
.textFieldStyle(_:). - text_
font Text.font(_:)— the overload that returnsText.- text_
font_ weight Text.fontWeight(_:)— the overload that returnsText.- text_
foreground_ color Text.foregroundColor(_:)— the overload that returnsText.- text_
foreground_ hierarchical Text.foregroundStyle(_:)with one of the hierarchical styles.- text_
foreground_ linear_ gradient Text.foregroundStyle(LinearGradient(...)).- text_
foreground_ ⚠style Text.foregroundStyle(_:)— the overload that returnsText.- text_
input_ completion - Apply
.textInputCompletion(_:). - text_
input_ formatting_ control_ visibility - Apply
.textInputFormattingControlVisibility(_:for:). - text_
input_ suggestions - Apply
.textInputSuggestions(_:content:)with[EdgeInsets]. - text_
interpolated Text("Item \(i)")— aTextbuilt through SwiftUI’s own interpolation.- text_
italic Text.italic()- text_
kerning Text.kerning(_:)— space added between every pair of characters.- text_
monospaced Text.monospaced(_:)- text_
renderer - Apply
.textRenderer(_:)with a runtime-synthesized renderer. - text_
scale - Apply
.textScale(_:isEnabled:). - text_
selection - Apply
.textSelection(_:). - text_
selection_ affinity - Apply
.textSelectionAffinity(_:). - text_
tracking Text.tracking(_:)— like kerning, but not suppressed between the pairs the font has a ligature for.- text_
typesetting_ explicit Text.typesettingLanguage(_:isEnabled:)with.explicit(_:).- text_
typesetting_ language Text.typesettingLanguage(_:isEnabled:)with aLocale.Language.- text_
verbatim Text(verbatim:)— the string as written, with no localisation lookup.- text_
verbatim_ ⚠words - The four words a verbatim
Textoccupies. - textfield
- Create a
TextFieldshowing a fixed string, which the user cannot edit. - textfield_
axis - Create a
TextFieldthat grows alongaxisas it is typed into. - textfield_
bound - Create a
TextFieldwired to Rust state — typing writes intostate. - timeline
TimelineView(.animation) { … }— rebuild the content on SwiftUI’s clock.- tint
- Apply
.tint(_:). - tint_
color - Apply
.tint(_:)through theColor?overload. - tint_
value - Apply
.tint(_:)to aColorthat is already built — one of SwiftUI’s named colours, which no set of components spells. - toggle
- Create a
Togglewith a text label. - toggle_
app_ storage Toggle(label, isOn: $flag)— a toggle driven directly by a real@AppStorage.- toggle_
bound - A
Togglewired to Rust state: it renders the current value and writes changes straight back. - toggle_
labelled Toggle(isOn:) { label }— a toggle whose label is any view.- toggle_
sources Toggle(_:isOn: [Binding<Bool>])— one toggle over several bindings.- toggle_
style - Apply
.toggleStyle(_:). - toolbar
- Apply
.toolbar { ToolbarItem { content } }. - toolbar_
background - Apply
.toolbarBackground(_:in:). - toolbar_
background_ visibility - Apply
.toolbarBackgroundVisibility(_:for:). - toolbar_
color_ scheme - Apply
.toolbarColorScheme(_:in:). - toolbar_
customizable - Apply
.toolbar(id:) { ToolbarItem(id:) { content } }— a toolbar the user can rearrange, whose arrangement the system persists undertoolbar_id. - toolbar_
customizable_ placed - The same, with the item placed somewhere other than
.automatic. - toolbar_
item_ hidden - Apply
.toolbarItemHidden(_:). - toolbar_
placed - Apply
.toolbar { ToolbarItem(placement:) { content } }. - toolbar_
role - Apply
.toolbarRole(_:). - toolbar_
title_ display_ mode - toolbar_
title_ menu - Apply
.toolbarTitleMenu(content:). - toolbar_
visibility - Apply
.toolbarVisibility(_:for:). - touch_
bar - Apply
.touchBar(content:). - touch_
bar_ customization_ label - Apply
.touchBarCustomizationLabel(_:). - touch_
bar_ item_ presence - Apply
.touchBarItemPresence(_:). - touch_
bar_ item_ principal - Apply
.touchBarItemPrincipal(_:). - tracking
- Apply
.tracking(_:). - transaction
- Apply
.transaction(_:). - transform_
anchor_ preference - Apply
.transformAnchorPreference(key:value:transform:). - transform_
effect - Apply
.transformEffect(_:)with aCGAffineTransform’s six components. - transform_
environment .transformEnvironment(_:transform:)for any property this crate has a key for.- transform_
environment_ image_ scale - Apply
.transformEnvironment(_:_:)for\EnvironmentValues.imageScale. - transform_
preference_ double - Apply
.transformPreference(_:_:), doubling the value in place. - transition
- Apply
.transition(_:)with anAnyTransitionalready built. - transition_
combined AnyTransition.combined(with:)— the receiver in x20, the other in x0.- transition_
fn - Register a transition. A closure taking the content and the phase is one.
- transition_
identity_ value AnyTransition.identity— a transition that does nothing.- transition_
opacity - Apply
.transition(.opacity). - transition_
opacity_ value AnyTransition.opacity, as one word.- transition_
scale AnyTransition.scale(scale:anchor:), as the single word it is.- transition_
scale_ value AnyTransition.scale— the static property, which scales from nothing.- transition_
slide - Apply
.transition(.slide)— in from the leading edge, out to the trailing. - truncation_
mode - Apply
.truncationMode(_:). - tuple_
view TupleView<(A, B, …)>— what a@ViewBuildermakes of several views, with no container around them.- type_
select_ equivalent - Apply
.typeSelectEquivalent(_:). - typesetting_
language - Apply
.typesettingLanguage(_:). - underline
- Apply
.underline(_:pattern:color:). - unredacted
- Apply
.unredacted(_:). - user_
activity - Apply
.userActivity(_:isActive:_:). - view_
opacity .opacity(_:), takingColor’s own overload when the receiver is aColor.- view_
that_ fits ViewThatFits(in:) { … }— the first child that fits.- visual_
effect - Apply
.visualEffect(_:). - vsplit_
view VSplitView { content }— the same, stacked.- vstack
VStackfrom children.- vstack_
aligned VStack(alignment:)from children.- vstack_
aligned_ spacing VStack(alignment:spacing:)from children.- vstack_
spacing VStack(spacing:)from children.- window_
dismiss_ behavior - window_
full_ screen_ behavior - window_
minimize_ behavior - window_
resize_ anchor - Apply
.windowResizeAnchor(_:). - window_
resize_ behavior - window_
toolbar_ full_ screen_ visibility - wrap_
word - Wrap a raw
AnyViewword back into a handle. - writing_
direction - Apply
.writingDirection(strategy:). - writing_
tools_ affordance_ visibility - Apply
.writingToolsAffordanceVisibility(_:). - writing_
tools_ behavior - z_index
- Apply
.zIndex(_:). - zstack
ZStackfrom children, centred.- zstack_
aligned ZStack(alignment:)from children.
Type Aliases§
- Persist
- Where a persistent
BoundStatealso writes on every set.