Skip to main content
Docs

UserProfileView

The UserProfileView component renders a comprehensive user profile interface that displays user information and provides account management options.

The UserProfileView component renders a comprehensive user profile interface that displays user information and provides account management options. It includes personal information, security settings, account switching, and sign-out functionality.

Important

The UserProfileView only appears when a user is signed in.

  • Name
    isDismissable
    Type
    Bool
    Description

    Whether the view can be dismissed by the user. When true, a dismiss button appears in the navigation bar and the view can be used in sheets or other dismissable contexts. When false, no dismiss button is shown, making it suitable for full-screen usage. Defaults to true.

Usage

The following examples show how to use the UserProfileView component in your iOS app.

Dismissible sheet presentation

Present UserProfileView as a dismissible sheet when you want users to be able to close the profile view and return to the previous screen.

struct MainView: View {
  @Environment(\.clerk) private var clerk
  @State private var profileIsPresented = false

  var body: some View {
    VStack {
      if clerk.user != nil {
        Button("Show Profile") {
          profileIsPresented = true
        }
      }
    }
    .sheet(isPresented: $profileIsPresented) {
      UserProfileView()
    }
  }
}

Full-screen profile view

Use UserProfileView as a full-screen view when you want to dedicate the entire screen to profile management.

struct ProfileView: View {
  @Environment(\.clerk) private var clerk

  var body: some View {
    if clerk.user != nil {
      UserProfileView(isDismissable: false)
    }
  }
}

Customization

To learn how to customize Clerk iOS components, see the .

If Clerk's prebuilt components don't meet your specific needs or if you require more control over the logic, you can rebuild the existing Clerk flows using the Clerk API. For more information, see the custom flow guides.

Feedback

What did you think of this content?

Last updated on