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 can include Stories, Clips and tenant-configured article sources. 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.
Await SDK initialization before checking availability or opening Search. Search functionality must be enabled for your Storyteller tenant before it can be used in the app. Contact your Storyteller account manager or support if you need assistance enabling this feature.
// Check if search is enabled// Signature: isSearchEnabled(): booleanconstsearchEnabled=StorytellerSdk.isSearchEnabled();// Open the search interface// Signature: openSearch(): voidStorytellerSdk.openSearch();
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:
On iOS, openSearch() dismisses an active Storyteller player before presenting Search. Android launches its native Search activity; do not rely on this method to dismiss an existing Android player.
openSearch() returns void, so it has no completion Promise or React Native load-error callback. Use isSearchEnabled() after successful initialization to decide whether to show a Search entry point.
If search is not enabled at the dashboard level, isSearchEnabled() will return false and openSearch() will have no effect.
Users can apply filters to narrow down their search results within the Search UI. Visible sections and options depend on native configuration and theming:
Certain UI parts of the Search component can be customized through theming. For more information, see the Search section in Themes.
Available customizations include the back icon and Filters heading on both platforms. iOS 11.6.0 and Android 11.6.3 additionally support Search and Filters-sheet backgrounds, input colours and typography, filter-button styling, suggestion rows, no-results content, filter options and the Apply button. Each field is optional and falls back independently when omitted or invalid.
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 can include `Stories`, `Clips` and tenant-configured article sources. 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\nAwait SDK initialization before checking availability or opening Search. Search functionality must be enabled for your Storyteller tenant 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\n// Signature: isSearchEnabled(): boolean\nconst searchEnabled = StorytellerSdk.isSearchEnabled();\n\n// Open the search interface\n// Signature: openSearch(): void\nStorytellerSdk.openSearch();\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- On iOS, `openSearch()` dismisses an active Storyteller player before presenting Search. Android launches its native Search activity; do not rely on this method to dismiss an existing Android player.\n- `openSearch()` returns `void`, so it has no completion Promise or React Native load-error callback. Use `isSearchEnabled()` after successful initialization to decide whether to show a Search entry point.\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. Visible sections and options depend on native configuration and theming:\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- `Articles` can also appear when an article source is configured\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 the back icon and Filters heading on both platforms. iOS 11.6.0 and Android 11.6.3 additionally support Search and Filters-sheet backgrounds, input colours and typography, filter-button styling, suggestion rows, no-results content, filter options and the Apply button. Each field is optional and falls back independently when omitted or invalid.\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"}