Skip to content

Search#

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.

Prerequisites#

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.

How to Use#

The Search functionality is available through the StorytellerSdk module:

API Reference#

// Check if search is enabled
// Signature: isSearchEnabled(): boolean
const searchEnabled = StorytellerSdk.isSearchEnabled();

// Open the search interface
// Signature: openSearch(): void
StorytellerSdk.openSearch();

Example Usage#

import StorytellerSdk from '@getstoryteller/react-native-storyteller-sdk';

// Check if search is available before opening
if (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.

Search Filters#

Users can apply filters to narrow down their search results within the Search UI. Visible sections and options depend on native configuration and theming:

Date Posted#

  • All - default value
  • Past 24 hours
  • Last Week
  • Last Month
  • Last Year

Content Type#

  • All - default value
  • Stories
  • Clips
  • Articles can also appear when an article source is configured

Sort By#

  • Relevance - default value
  • Like Count
  • Share Count
  • Date Posted

Note: Filter selections persist during the current session but reset when the Search component is dismissed and reopened.

Customization#

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.