View Styles

Find the built-in styles for different types of views.

Topics

Button Styles

struct DefaultButtonStyle

The default button style, based on the button’s context.

struct PlainButtonStyle

A button style that doesn’t style or decorate its content while idle, but may apply a visual effect to indicate the pressed, focused, or enabled state of the button.

struct LinkButtonStyle

A button style for buttons that emulate links.

struct BorderedButtonStyle

A button style that applies standard border artwork based on the button’s context.

struct BorderlessButtonStyle

A button style that doesn’t apply a border.

protocol PrimitiveButtonStyle

A type that applies custom interaction behavior and a custom appearance to all buttons within a view hierarchy.

protocol ButtonStyle

A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy.

Toggle Styles

List Styles

struct DefaultListStyle

The instance that describes a platform’s default behavior and appearance for a list.

struct PlainListStyle

The instance that describes the behavior and appearance of a plain list.

struct GroupedListStyle

The instance that describes the behavior and appearance of a grouped list.

struct CarouselListStyle

The instance that describes the behavior and appearance of carousel.

struct SidebarListStyle

The instance that describes the behavior and appearance of a sidebar list.

protocol ListStyle

A protocol that describes the behavior and appearance of a list.

See Also

Styling Specific View Types

func buttonStyle<S>(S) -> View

Sets the style for buttons within this view to a button style with a custom appearance and custom interaction behavior.

func buttonStyle<S>(S) -> View

Sets the style for buttons within this view to a button style with a custom appearance and standard interaction behavior.

func menuButtonStyle<S>(S) -> View

Sets the style for menu buttons within this view.

func pickerStyle<S>(S) -> View

Sets the style for pickers within this view.

func datePickerStyle<S>(S) -> View

Sets the style for date pickers within this view.

func textFieldStyle<S>(S) -> View

Sets the style for text fields within this view.

func toggleStyle<S>(S) -> View

Sets the style for toggles within this view.

func listStyle<S>(S) -> View

Sets the style for lists within this view.

func navigationViewStyle<S>(S) -> View

Sets the style for navigation views within this view.