A view is an SDK object that renders Storyteller content into an element on
your page. Choose the view that matches the content and layout you need, then
follow its guide.
Goal
View
Content source
Show Stories in a horizontal row
StorytellerStoriesRowView
Optional Category IDs
Show Stories in a grid
StorytellerStoriesGridView
Optional Category IDs
Show Clips in a horizontal row
StorytellerClipsRowView
Collection ID
Show Clips in a grid
StorytellerClipsGridView
Collection ID
Play Clips in an area of the page set aside for Clips
To open a Story or Clips player from a button, link, or route in your
application, call a method on Storyteller.sharedInstance, such as
openStory,
openCollection, or
openClipByExternalId.
Both Clips player views render the Clips player into your container.
StorytellerEmbeddedClipsPlayerView shows one Clip at a time, lets the rest of
the page scroll, and ignores Storyteller.sharedInstance.dismissPlayer.
StorytellerClipsPlayerView uses the full Clips player layout, which can show
neighboring Clips on wide screens, and locks page scrolling while it's shown.
{"slug": "views-index", "page_title": "Choose a View", "page_url": "views/", "canonical_url": "/web/views/", "markdown": "# Choose a view {#choose-a-storyteller-view}\n\nA view is an SDK object that renders Storyteller content into an element on\nyour page. Choose the view that matches the content and layout you need, then\nfollow its guide.\n\n| Goal | View | Content source |\n| --- | --- | --- |\n| Show Stories in a horizontal row | `StorytellerStoriesRowView` | Optional Category IDs |\n| Show Stories in a grid | `StorytellerStoriesGridView` | Optional Category IDs |\n| Show Clips in a horizontal row | `StorytellerClipsRowView` | Collection ID |\n| Show Clips in a grid | `StorytellerClipsGridView` | Collection ID |\n| Play Clips in an area of the page set aside for Clips | [`StorytellerClipsPlayerView`](../StorytellerEmbeddedClipsPlayerView.md#clips-player-view) | Collection ID, `{ clipId }`, or `{ externalId }` |\n| Play Clips inside other page content, such as a live blog | [`StorytellerEmbeddedClipsPlayerView`](../StorytellerEmbeddedClipsPlayerView.md) | Collection ID, `{ clipId }`, or `{ externalId }` |\n\nEvery view constructor takes these arguments:\n\n- `elementId`: the ID of the element the view renders into\n- `categories` (Stories views, optional): Category IDs. Without them, the view shows the Stories in your Home list.\n- `collectionId` (Clips rows and grids): the collection ID\n- `source` (Clips player views): a collection ID, `{ clipId }`, or `{ externalId }`. The constructor throws an `Error` if you pass no source or more than one.\n\nThe [API reference](../reference/index.md) lists the full constructor\nsignatures.\n\n## Rows\n\nUse a row for a compact list that users scroll horizontally. Rows can show\nround or square tiles through [`cellType`](../StorytellerRowView.md#celltype).\nGrids don't use `cellType`.\n\n[Add a Story or Clips row](../StorytellerRowView.md)\n\n## Grids\n\nUse a grid when the page should show more tiles at once. Grids use the same\nsettings as the other views.\n\n[Add a Story or Clips grid](../StorytellerGridView.md)\n\n## Open a player from your code {#open-clips-from-a-custom-control}\n\nTo open a Story or Clips player from a button, link, or route in your\napplication, call a method on `Storyteller.sharedInstance`, such as\n[`openStory`](../AdditionalMethods.md#openstory),\n[`openCollection`](../AdditionalMethods.md#opencollection), or\n[`openClipByExternalId`](../AdditionalMethods.md#openclipbyexternalid).\n\n[Open a player programmatically](../OpenPlayer.md)\n\n## Clips players {#embedded-clips-player}\n\nBoth Clips player views render the Clips player into your container.\n`StorytellerEmbeddedClipsPlayerView` shows one Clip at a time, lets the rest of\nthe page scroll, and ignores `Storyteller.sharedInstance.dismissPlayer`.\n`StorytellerClipsPlayerView` uses the full Clips player layout, which can show\nneighboring Clips on wide screens, and locks page scrolling while it's shown.\n\n[Add a Clips player to a page](../StorytellerEmbeddedClipsPlayerView.md)\n\n## Polls and Quizzes\n\nPolls and Quizzes are Story Pages: Pages inside a Story. Show the Story in a\nStories row or grid, and the Story player handles the Poll or Quiz.\n\n[Show Polls and Quizzes](engagement.md)\n\n## Settings shared by all views {#shared-list-configuration}\n\nAll views share settings for content, themes, display limits, preload\nbehavior, analytics context, and delegates.\n\n[Configure views](../StorytellerListView.md)\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}