Enumerations

The following enumerations are available globally.

  • Represents the visual shape of a button used in themed UI components.

    This enum defines several commonly used button shapes, including:

    • Square: No rounding.
    • Rounded: Medium rounding using the theme’s default radius.
    • Capsule: Fully rounded pill shape.
    • Custom: Developer-defined corner radius.
    See more

    Declaration

    Swift

    public enum ButtonShape : Equatable
  • Defines the size and layout configuration for themed buttons.

    ButtonSize controls padding and font size for different button scales. It also supports full-width layout and fully custom styles.

    See more

    Declaration

    Swift

    public enum ButtonSize : Equatable
  • Defines the available visual style variants for themed buttons in SwiftThemeKit.

    ButtonVariant controls the button’s background, foreground, border, and elevation behavior in conjunction with its semantic role (such as .destructive) and pressed state.

    These variants can be configured per button using .buttonVariant(_) or via Theme.buttons.variant for global defaults.

    See more

    Declaration

    Swift

    public enum ButtonVariant
  • Represents the visual shape of a button used in themed UI components.

    This enum defines several commonly used button shapes, including:

    • Square: No rounding.
    • Rounded: Medium rounding using the theme’s default radius.
    • Capsule: Fully rounded pill shape.
    • Custom: Developer-defined corner radius.
    See more

    Declaration

    Swift

    public enum CheckboxShape : Equatable
  • Represents horizontal alignment or placement direction.

    Used to position UI elements such as labels relative to controls (e.g., leading or trailing side of a checkbox or radio button).

    • Example: swift Checkbox(isChecked: $checked, label: "Accept Terms", labelPosition: .leading)
    See more

    Declaration

    Swift

    public enum HorizontalPosition : CaseIterable
  • Represents vertical alignment or placement direction.

    Useful for positioning content relative to other components, such as placing a message above or below a form field.

    • Example: swift Tooltip(position: .top)
    See more

    Declaration

    Swift

    public enum VerticalPosition : CaseIterable
  • Represents the visual shape of a text field used in themed UI components.

    This enum defines several commonly used button shapes, including:

    • Square: No rounding.
    • Rounded: Medium rounding using the theme’s default radius.
    • Capsule: Fully rounded pill shape.
    • Custom: Developer-defined corner radius.
    See more

    Declaration

    Swift

    public enum TextFieldShape : Equatable
  • Represents the size of a text field, affecting both padding and font.

    Use this enum to configure consistent spacing and typography for text fields across your application.

    • Usage: swift TextField("Name", text: $name) .textFieldSize(.medium)

    Sizes are mapped to tokens defined in your Theme for consistent scaling.

    See more

    Declaration

    Swift

    public enum TextFieldSize
  • Defines the visual style or variant of a text field.

    Use TextFieldVariant to control how a text field appears in your UI. Each variant corresponds to a specific Material-style or native iOS presentation.

    This enum is typically consumed by ThemeTextFieldStyle or applied via modifiers like .textFieldVariant() to customize text field appearance.

    • Usage: swift TextField("Email", text: $email) .textFieldVariant(.outlined)
    See more

    Declaration

    Swift

    public enum TextFieldVariant
  • Undocumented

    See more

    Declaration

    Swift

    public enum ColorToken : String, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum RadiusToken : String, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum ShadowToken : String, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum ShapeToken : String, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum SpacingToken : String, CaseIterable
  • Stroke tokens for standardized access to stroke widths.

    See more

    Declaration

    Swift

    public enum StrokeToken : String, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum TextStyleToken : String, CaseIterable