SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Speed run — just the code
Speed run — just the code
Prerequisites: SDK installed and authenticated → SDK Setup. Users must have
displayName set for search to work.After completing this guide you’ll have:
- Display-name user search integrated and returning paginated results
- A “People you may know” suggestion list populated from the SDK
- Follow action triggered directly from search results
Quick Start: Search Users by Name
TypeScript
Step-by-Step Implementation
Search users by display name
Use Full reference → Search & Query Users
searchUserByDisplayName() to search as the user types. Results are returned as a live collection that updates in real-time.TypeScript
Browse all users (directory)
Query all users with pagination for a “People” directory or admin user list.Full reference → Search & Query Users
TypeScript
Get user details for result cards
For each search result, display their avatar, display name, bio, and follower count by querying the user profile.Full reference → Get User Information
TypeScript
Add follow button to user cards
Check the connection status and show the right button state: “Follow”, “Requested”, or “Following”.Full reference → Get Connection Status · Follow / Unfollow User
TypeScript
Connect to Moderation & Analytics
Search analytics
Search analytics
Track what users search for in Admin Console → Analytics → Search Insights. High-frequency searches with 0 results indicate missing content or users.
User flagging from search
User flagging from search
Search results should include a “Report” action. Flagged users appear in the Admin Console moderation queue.→ Flag / Unflag User
Visitor filtering
Visitor filtering
Visitor and bot users are automatically excluded from search results. Only authenticated (
SIGNED_IN) users appear in searchUserByDisplayName() results.Common Mistakes
Best Practices
Search UX
Search UX
- Add a 300ms debounce before firing the search query — prevents excessive API calls while typing
- Show recent searches and suggested users before the user starts typing
- Display skeleton placeholders while results load
- Show “No users found” with a suggestion to try a different name if the query returns 0 results
- Highlight the matching portion of the display name in results (bold “Joe” in “Joey Smith”)
User cards
User cards
- Show avatar + display name + short bio (first 50 characters) + follower count
- Include a single CTA button: “Follow” / “Requested” / “Following” based on connection status
- Show a verified badge or role badge (e.g., “Moderator”) for users with special roles
- Cache user cards for recently viewed profiles to avoid re-fetching on back navigation
Performance
Performance
- Limit search results to 20 items; use pagination for deeper results
- Unsubscribe the search live collection when the search screen closes
- For “People you may know”, compute suggestions server-side or cache them — don’t recompute on every render
- Pre-fetch connection status for visible users in batch rather than one-by-one
Next Steps
Your next step → User Profiles & Social Graph
Users can find each other — now build rich profiles with avatars, bios, and follow connections.
User Profiles & Social Graph
Build the profile page users navigate to from search
Search & Discovery
Search posts and communities alongside users
Community Platform
Discover users within communities