Structures

The following structures are available globally.

  • The HTML template provided by SwiftWeb. Serve this with your HTTP server implementation.

    See more

    Declaration

    Swift

    public struct HTMLTemplate
  • An environment-dependent font.

    See more

    Declaration

    Swift

    public struct Font
  • A property wrapper type that can read and write a value owned by a source of truth.

    See more

    Declaration

    Swift

    @propertyWrapper
    public struct Binding<Value>
  • The EmptyView is used by the ViewBuilder as a return value for empty blocks.

    See more

    Declaration

    Swift

    public struct EmptyView : View
  • A type-erased View.

    An AnyView allows changing the type of view used in a given view hierarchy.

    See more

    Declaration

    Swift

    public struct AnyView : View, CustomMappable
  • A control that performs an action when triggered.

    See more

    Declaration

    Swift

    public struct Button<Label> : View where Label : View
  • An environment-dependent color.

    See more

    Declaration

    Swift

    public struct Color : View, GrowingAxesModifying
  • The collection of underlying identified data that SwiftWeb uses to create views dynamically.

    See more

    Declaration

    Swift

    public struct ForEach<Data, ID, Content> : View, CustomMappable where Data : RandomAccessCollection, Content : View
  • A container for grouping controls used for data entry, such as in settings or inspectors.

    See more

    Declaration

    Swift

    public struct Form<Content> : View where Content : View
  • A view that arranges its children in a horizontal line.

    See more

    Declaration

    Swift

    public struct HStack<Content> : Stack, GrowingAxesModifying where Content : View
  • A view that displays an image.

    See more

    Declaration

    Swift

    public struct Image : View
  • A container that presents rows of data arranged in a single column.

    See more

    Declaration

    Swift

    public struct List<Content> : View, GrowingAxesModifying where Content : View
  • A view for presenting a stack of views representing a visible path in a navigation hierarchy. Currently, only the display of a title bar is implemented, no navigation is possible yet with SwiftWeb.

    See more

    Declaration

    Swift

    public struct NavigationView<Content> : View where Content : View
  • A configuration for a navigation bar that represents a view at the top of a navigation stack.

    See more

    Declaration

    Swift

    public struct NavigationBarItem
  • A control for selecting from a set of mutually exclusive values. SwiftWeb currently only implements the SegmentedPickerStyle for Picker.

    See more

    Declaration

    Swift

    public struct Picker<SelectionValue, Content>: View
            where SelectionValue: Hashable, Content: View
  • A structure representing the segmented style of the Picker. This is currently the only supported style in SwiftWeb.

    See more

    Declaration

    Swift

    public struct SegmentedPickerStyle : PickerStyle
  • An affordance for creating hierarchical view content.

    See more

    Declaration

    Swift

    public struct Section<Parent, Content> : View where Parent : View, Content : View
  • A control for selecting a value from a bounded linear range of values.

    See more

    Declaration

    Swift

    public struct Slider : View, ChangeInputEventResponder, GrowingAxesModifying
  • A flexible space that expands along the major axis of its containing stack layout, or on both axes if not contained in a stack.

    See more

    Declaration

    Swift

    public struct Spacer : View, GrowingAxesModifying
  • A view that switches between multiple child views using interactive user interface elements.

    See more

    Declaration

    Swift

    public struct TabView<Content> : View where Content : View
  • A view that displays one or more lines of read-only text.

    See more

    Declaration

    Swift

    public struct Text : View
  • A control that displays an editable text interface.

    See more

    Declaration

    Swift

    public struct TextField : View, ChangeInputEventResponder
  • A View created from a swift tuple of View values.

    See more

    Declaration

    Swift

    public struct TupleView<T> : View, TypeErasedTupleView
  • A view that arranges its children in a vertical line.

    See more

    Declaration

    Swift

    public struct VStack<Content> : Stack, GrowingAxesModifying where Content : View
  • A custom parameter attribute that constructs views from closures.

    See more

    Declaration

    Swift

    @_functionBuilder
    public struct ViewBuilder
  • A view that overlays its children, aligning them in both axes.

    See more

    Declaration

    Swift

    public struct ZStack<Content> : Stack, GrowingAxesModifying where Content : View