Skip to Content

🔍 Search

The Search component from @zezosoft/zezo-ott-react-native-ui-kit offers a responsive, theme-aware UI for searching movies, series, genres, and more. It provides a seamless user experience with live results, recommendation support, and customizable interaction handlers.


⚙️ Key Features

  • 🔎 Live keyword-based search
  • 🧠 Recent search history & smart recommendations
  • ⌛ Skeleton loading placeholders
  • 📭 Graceful handling of no-results or API errors
  • 🌙 Auto adapts to light/dark theme
  • 🛠️ Fully customizable via event handlers and layout props

📸 UI Previews

Search Light
Search Results Light
Search Dark
Search Results Dark

📡 API Call Methods

⚙️ First, set up the getZezoOtt API client: API Client Setup

🧪 The following API methods are used in the Search screen:


🧑‍💻 Basic Usage

SearchScreen.tsx
import React, { useState } from "react"; import { SafeAreaWrapper, Search as ZezoSearch, } from "@zezosoft/zezo-ott-react-native-ui-kit"; const { One: Search } = ZezoSearch; const SearchScreen = () => { const [keyword, setKeyword] = useState(""); return ( <SafeAreaWrapper> <Search placeholder="Movies, series, genres, cast..." search={keyword} results={[]} // Replace with actual API result isLoading={false} noResultsText="No content found" recommendedContent={undefined} pillMaxCount={5} skeletonCardCount={6} recommendedContentCardStyles={{}} skeletonConfig={{}} events={{ onSubmit: ({ keyword }) => setKeyword(keyword), onChangeText: setKeyword, onClear: () => setKeyword(""), onItemPress: ({ item }) => { // Navigate to detail screen }, onPressRecommendedItem: ({ item }) => { // Handle recommendation click }, onPressRecommendedMore: ({ section_id }) => { // Navigate to full section screen }, moreFetchDataRecommended: async () => { // Fetch more recommendations }, }} /> </SafeAreaWrapper> ); }; export default SearchScreen;

🔧 Props Reference

Prop NameTypeDescription
placeholderstringInput field placeholder text
searchstringCurrent search keyword
resultsISearchItem[]Array of content to display as search results
isLoadingbooleanShows loading skeletons when true
noResultsTextstringMessage shown when no results or API error
recommendedContentISectionItem | nullOptional recommended content section
pillMaxCountnumberMax number of recent search pills to display
skeletonCardCountnumberNumber of skeleton placeholders to show
recommendedContentCardStylesRecommendedCardStylesCustom styles for recommended content cards
skeletonConfigSearchCardSkeletonConfigConfiguration for skeleton loader cards
themeAppThemeTheme override (optional)
eventsobjectCallback handlers for input, clear, press, recommendation, fetch

🎯 Event Handlers

Event NameTypeDescription
onSubmit(values: { keyword: string }) => voidCalled when search is submitted
onClear() => voidClears the search input
onChangeText(text: string) => voidTriggered on each keystroke
onItemPress({ item: IContentData }) => voidCalled when a result item is clicked
onPressRecommendedItem({ item: IContentData }) => voidCalled when a recommended item is clicked
onPressRecommendedMore({ section_id, name, type }) => voidCalled when “More” is tapped for a recommended section
moreFetchDataRecommendedMoreFetchData<IContentData>Fetch function for recommended content pagination

💡 Best Practices

  • Use external data hooks (react-query, SWR) to populate results.
  • Combine skeletonCardCount + isLoading for smoother UX.
  • Customize cards via recommendedContentCardStyles or slot overrides.
  • Utilize pillMaxCount to avoid overflow in recent search chips.

✍️ Created by Naresh Dhamu – Powered by ZezoSoft

Last updated on