Interactive previews iPhone Duo

Hinge State

A type encapsulating the state of a single hinge.

Hinge State - Preview Not Available

Platform Compatibility

iOS 27.1+ iPadOS 27.1+

Tags

SwiftUI Code

Docs
@State private var hinge: DeviceHinge? = nil

var body: some View {
    VStack {
        if let hinge {
            Text("Status \(hinge.status)")
            Text("Angle \(hinge.angle.degrees, specifier: "%.0f")°")
        } else {
            ContentUnavailableView(
                "Hinge Unavailable",
                systemImage: "rectangle.split.2x1"
            )
        }
    }
    .onHingeChange { _, newContext in
        hinge = newContext.hinge
    }
}

Found an issue or have a suggestion?

Created: September 26, 2026Updated: October 27, 2026
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More View Components

View all
VisionOS background materials - visionOS - Liquid Glass - Light Mode - Preview
type

VisionOS background materials

All background materials on visionOS

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.

Toolbar Vertical Edge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
environment

Toolbar Vertical Edge

This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.

Disabled Toolbar Vertical Behavior - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
modifier

Disabled Toolbar Vertical Behavior

Disables the vertical bar.

Music Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Music Picker

Presents a music picker to select items from the Apple Music catalog and the user’s music library.

App Store Overlay - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

App Store Overlay

Presents a StoreKit overlay when a given condition is true.

Manage Subscriptions Sheet - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Manage Subscriptions Sheet

Opens the manage subscriptions sheet.

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

Swipe Container

Only allows a single active swipe within a container.

Explore Other Components

Browse all
Sheet Background - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Sheet Background

Sets the presentation background of the enclosing sheet using a shape style.

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

LinearCapacityGaugeStyle

A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases

Remove Toolbar Item Margin - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Remove Toolbar Item Margin

Configures whether the content margins are removed.

Current Value Gauge  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Current Value Gauge

Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value

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

SwitchToggleStyle

A toggle style that displays a leading label and a trailing switch.

Button Sizing - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Button Sizing

The preferred sizing behavior of buttons in the view hierarchy.

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

Picker

Creates a pickers with title, image, systemImage, and custom label.

Edit Button - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

Edit Button

A button that toggles the edit mode environment value.