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.
Declaration
Swift
public enum ButtonShape : Equatable -
Defines the size and layout configuration for themed buttons.
See moreButtonSizecontrols padding and font size for different button scales. It also supports full-width layout and fully custom styles.Declaration
Swift
public enum ButtonSize : Equatable -
Defines the available visual style variants for themed buttons in SwiftThemeKit.
ButtonVariantcontrols 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
See more.buttonVariant(_)or viaTheme.buttons.variantfor global defaults.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.
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)
Declaration
Swift
public enum HorizontalPosition : CaseIterable - Example:
-
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)
Declaration
Swift
public enum VerticalPosition : CaseIterable - Example:
-
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.
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
See moreThemefor consistent scaling.Declaration
Swift
public enum TextFieldSize - Usage:
-
Defines the visual style or variant of a text field.
Use
TextFieldVariantto 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
ThemeTextFieldStyleor applied via modifiers like.textFieldVariant()to customize text field appearance.- Usage:
swift TextField("Email", text: $email) .textFieldVariant(.outlined)
Declaration
Swift
public enum TextFieldVariant - Usage:
-
Undocumented
See moreDeclaration
Swift
public enum ColorToken : String, CaseIterable -
Undocumented
See moreDeclaration
Swift
public enum RadiusToken : String, CaseIterable -
Undocumented
See moreDeclaration
Swift
public enum ShadowToken : String, CaseIterable -
Undocumented
See moreDeclaration
Swift
public enum ShapeToken : String, CaseIterable -
Undocumented
See moreDeclaration
Swift
public enum SpacingToken : String, CaseIterable -
Stroke tokens for standardized access to stroke widths.
See moreDeclaration
Swift
public enum StrokeToken : String, CaseIterable -
Undocumented
See moreDeclaration
Swift
public enum TextStyleToken : String, CaseIterable
Enumerations Reference