Interactive previews iPhone

Color Opacity

The Color opacity modifier

Color Opacity - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview

Platform Compatibility

iOS 16.0+ iPadOS 16.0+ macOS 13.0+ watchOS 9.0+ tvOS 16.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
HStack {
  smallRect
    .foregroundStyle(.blue.opacity(1))
  smallRect
    .foregroundStyle(.blue.opacity(0.7))
  smallRect
    .foregroundStyle(.blue.opacity(0.5))
  smallRect
    .foregroundStyle(.blue.opacity(0.3))
  smallRect
    .foregroundStyle(.blue.opacity(0.1))
}

Found an issue or have a suggestion?

Created: May 29, 2025Updated: May 29, 2025
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More Color Components

View all
Color Gradient - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Color Gradient

The Color gradient modifier

UIKit Separator Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Separator Colors

The UIKit separator colors that are also used in other components, such as the TextField

UIKit Content Background colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Content Background colors

The UIKit colors that are also used in other components like in List and GroupBox

UIKit Text Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Text Colors

The UIKit text colors that are also used in other components, such as the TextField

UIKit Fill Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Fill Colors

UIKit Label Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Label Colors

Color Variants - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Color Variants

HierarchicalShapeStyle, a shape style that maps to one of the numbered content styles

Semantic Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Semantic Colors

Explore Other Components

Browse all
Disable Sheet Dismiss Swipe - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Disable Sheet Dismiss Swipe

Conditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors. Dragging the sheet is still possible to a limited extent, as shown in the screenshot, but it will never be dismissed.

Container Content Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Content Margins

Adds the margins of the container the view is in.

PaletteControlGroupStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

PaletteControlGroupStyle

A control group style that presents its content as a palette.

Glass effect - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Glass effect

Applies the Liquid Glass effect to a view

Default Tab Bar Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Default Tab Bar Placement

Specifies the preferred placement for the tabs of a TabView in the sidebarAdaptable style on platforms where the tab bar cannot adapt between different representations, and only one representation can be shown. For example, on iOS, it can enforce the sidebar on large-screen devices like the Pro Max, and iPhone Duo. This modifier has no effect on iPadOS.

NavigationSplitView - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

NavigationSplitView

Creates a two-column navigation split view.

SidebarAdaptableTabViewStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

SidebarAdaptableTabViewStyle

A tab bar style that adapts to each platform.

Refreshable List - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Refreshable List

Marks this view as refreshable.