Skip to content

Commit 169ed35

Browse files
committed
Add user profile view
1 parent 0f27546 commit 169ed35

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: '`UserProfileView`'
3+
description: Clerk's UserProfileView renders a beautiful, full-featured account management UI that allows users to manage their profile and security settings.
4+
sdk: android
5+
---
6+
7+
![The UserProfileView renders a comprehensive user profile interface that displays user information and provides account management options.](/docs/images/ui-components/ios-user-profile-view.png){{ style: { maxWidth: '460px' } }}
8+
9+
The `UserProfileView` 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.
10+
11+
> [!IMPORTANT]
12+
> The `UserProfileView` only appears when a user is signed in.
13+
14+
## Parameters
15+
16+
<Properties>
17+
- `clerkTheme`
18+
- `ClerkTheme`
19+
20+
The theme to apply to the `UserButton`. This will override any theme applied to the `UserButton`'s parent view, or configured in the `Clerk` global object.
21+
22+
- `onDismiss`
23+
- `() -> Unit`
24+
25+
A callback that is called when the user dismisses the view.
26+
</Properties>
27+
28+
## Usage
29+
30+
The following example shows how to use the `UserProfileView` in your Android app.
31+
32+
### Full-screen profile view
33+
34+
Use `UserProfileView` as a full-screen view when you want to dedicate the entire screen to profile management.
35+
36+
```kotlin
37+
38+
import androidx.compose.runtime.Composable
39+
import androidx.compose.runtime.getValue
40+
import androidx.lifecycle.compose.collectAsStateWithLifecycle
41+
import com.clerk.api.Clerk
42+
import com.clerk.ui.userprofile.UserProfileView
43+
44+
@Composable
45+
fun ProfileView() {
46+
val user by Clerk.userFlow.collectAsStateWithLifecycle()
47+
if (user != null) {
48+
UserProfileView()
49+
}
50+
}
51+
```
52+
53+
## Customization
54+
55+
<Include src="_partials/android/customization" />

0 commit comments

Comments
 (0)