@@ -29,7 +29,9 @@ export type UserProfileMode = Exclude<SwitcherMode, 'organization'>;
2929
3030/** Everything `<UserProfile />` takes: your own pages and their order, the page it opens on, and the OAuth scopes it asks for. */
3131export interface UserProfileProps
32- extends Pick < UserProfileViewProps , 'customPages' | 'pageOrder' > , Pick < UserProfileOptions , 'additionalOAuthScopes' > {
32+ extends
33+ Pick < UserProfileViewProps , 'customPages' | 'pageOrder' | 'showSearch' > ,
34+ Pick < UserProfileOptions , 'additionalOAuthScopes' > {
3335 /**
3436 * The page the profile opens on: a built-in page's id, or a custom page's `path`. Unlike
3537 * `pageOrder`, it leaves the navigation order alone. A page the navigation does not list opens
@@ -106,6 +108,12 @@ export interface UserProfileProps
106108 * ```
107109 *
108110 * @example
111+ * `showSearch` adds a search field above the navigation that finds pages, and the sections on them.
112+ * ```tsx
113+ * <UserProfile showSearch />
114+ * ```
115+ *
116+ * @example
109117 * `customPages` adds your own pages; `pageOrder` places them among the built-in ones.
110118 * ```tsx
111119 * <UserProfile
@@ -138,6 +146,7 @@ export function UserProfileSurface({
138146 pageOrder,
139147 defaultPage,
140148 additionalOAuthScopes,
149+ showSearch,
141150 fallback,
142151 apiKeysProps : { hide : hideAPIKeys = false , ...apiKeysProps } = { } ,
143152} : UserProfileProps & { presentation : NonNullable < UserProfileOptions [ 'mode' ] > } ) {
@@ -156,6 +165,7 @@ export function UserProfileSurface({
156165 initialPage : defaultPage ?? pageOrder ?. [ 0 ] ?? 'account' ,
157166 customPages,
158167 pageOrder,
168+ showSearch,
159169 pages : {
160170 account : < UserProfileProfilePanel /> ,
161171 security : < UserProfileSecurityPanel /> ,
0 commit comments