The Search component allows users to search for Storyteller Clips and Stories. As users type, a list of suggestions will appear, from which users can either select a suggestion or search using their entered term. Results are categorized into two sections: Stories and Clips, based on their type. Filters allow users to narrow down their search results, enabling them to find specific content that meets their criteria more efficiently. For instance, users can apply filters such as date posted, content type or they can sort it by certain criteria.
Search functionality must be enabled in your Storyteller dashboard before it can be used in the app. Contact your Storyteller account manager or support if you need assistance enabling this feature.
importStorytellerSdkfrom'@getstoryteller/react-native-storyteller-sdk';// Check if search is available before openingif(StorytellerSdk.isSearchEnabled()){StorytellerSdk.openSearch();}else{console.log('Search is not enabled for this app');}
Behavior Notes:
If the Storyteller player is currently displayed when openSearch() is called, it will be dismissed before presenting the Search component.
If search is not enabled at the dashboard level, isSearchEnabled() will return false and openSearch() will have no effect.
Certain UI parts of the Search component can be customized through theming. For more information, see the Search section in Themes.
Available customizations include:
Back icon
Heading font, size, and color (iOS only)
Text case for headings
Line height for text elements
For detailed theme configuration options, refer to the full Themes documentation.
{"slug": "search", "page_title": "Search", "page_url": "Search/", "canonical_url": "/react-native/Search/", "markdown": "# Search\n\nThe `Search` component allows users to search for Storyteller Clips and Stories. As users type, a list of suggestions will appear, from which users can either select a suggestion or search using their entered term. Results are categorized into two sections: `Stories` and `Clips`, based on their type. Filters allow users to narrow down their search results, enabling them to find specific content that meets their criteria more efficiently. For instance, users can apply filters such as date posted, content type or they can sort it by certain criteria.\n\n## Prerequisites\n\nSearch functionality must be enabled in your Storyteller dashboard before it can be used in the app. Contact your Storyteller account manager or support if you need assistance enabling this feature.\n\n## How to Use\n\nThe `Search` functionality is available through the `StorytellerSdk` module:\n\n### API Reference\n\n```typescript\n// Check if search is enabled\nStorytellerSdk.isSearchEnabled(): boolean\n\n// Open the search interface\nStorytellerSdk.openSearch(): void\n```\n\n### Example Usage\n\n```typescript\nimport StorytellerSdk from '@getstoryteller/react-native-storyteller-sdk';\n\n// Check if search is available before opening\nif (StorytellerSdk.isSearchEnabled()) {\n StorytellerSdk.openSearch();\n} else {\n console.log('Search is not enabled for this app');\n}\n```\n\n**Behavior Notes:**\n\n- If the Storyteller player is currently displayed when `openSearch()` is called, it will be dismissed before presenting the `Search` component.\n- If search is not enabled at the dashboard level, `isSearchEnabled()` will return `false` and `openSearch()` will have no effect.\n\n## Search Filters\n\nUsers can apply filters to narrow down their search results within the Search UI:\n\n### Date Posted\n\n- `All` - default value\n- `Past 24 hours`\n- `Last Week`\n- `Last Month`\n- `Last Year`\n\n### Content Type\n\n- `All` - default value\n- `Stories`\n- `Clips`\n\n### Sort By\n\n- `Relevance` - default value\n- `Like Count`\n- `Share Count`\n- `Date Posted`\n\n**Note:** Filter selections persist during the current session but reset when the Search component is dismissed and reopened.\n\n## Customization\n\nCertain UI parts of the `Search` component can be customized through theming. For more information, see the [Search section in Themes](Themes.md#search).\n\nAvailable customizations include:\n\n- Back icon\n- Heading font, size, and color (iOS only)\n- Text case for headings\n- Line height for text elements\n\nFor detailed theme configuration options, refer to the full [Themes documentation](Themes.md).\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}