Spoilers

Spoilers allow you to hide specific information within sentences, only showing it if the reader clicks a certain button requesting to see. This is obviously valuable if the text contains a “spoiler” that the reader would only want to see if they are already in the know, but can be used in other contexts, too, such as to include bonus information for readers who want to dig deeper without cluttering up the page.

Example

<!--Provide unique input 'id' and label 'for' attributes to make multiple spoilers work properly. -->
<div class="stk-snippets-inline-spoiler stk-container" data-ce-tag="container" data-container-name="Spoiler paragraph">
  <p class="stk-reset stk-theme_00000__mb_0">The <strong class="stk-reset">Solomon R. Guggenheim Museum</strong>, often referred to as The Guggenheim, is an art museum located at 1071 Fifth Avenue on the corner of East 89th Street in the Upper East Side neighborhood of Manhattan, New York City. It is the permanent home of a continuously expanding collection of Impressionist, Post-Impressionist, early Modern, and contemporary art and also features special exhibitions throughout the year. The museum was established by the Solomon R. Guggenheim Foundation in 1939 as the Museum of Non-Objective Painting, under the guidance of its first director, Hilla von Rebay.</p>
  <input id="trigger-spoiler-01" class="stk-snippets-inline-spoiler__input" type="checkbox">
  <p class="stk-snippets-inline-spoiler__content stk-reset stk-theme_00000__mb_0">It adopted its current name after the death of its founder Solomon R. Guggenheim in 1952.</p>
  <label class="stk-snippets-inline-spoiler__trigger" for="trigger-spoiler-01" data-ce-tag="container" data-container-name="Spoiler trigger"></label>
</div>
<p class="stk-reset"></p>

Replace style id `stk-theme_00000` with yours before adding it to your Style Manager. For more info, please go to the Introduction page.

Content Experience Impact

If your information contains actual spoilers, hiding them like this can build trust with your reader because you aren’t ruining any information for them. But, regardless of how you use spoilers components, it can create a smoother reading experience by reducing text clutter, putting the most important information front and center and allowing the reader to expand the extra text only if they’re interested.

Dos

  • Make it clear to the reader what spoilers are and how to use them, especially if this is a new feature for your publication. Consider explaining the feature at the top of the page, in the intro, or next to the first spoiler.

  • Consider pop-up footnotes as an alternative for adding bonus information, especially when the information is long or doesn’t fit naturally within the main body text.

Don'ts

Don’t hide information that is critical to the flow of the article. Imagine a user reading the article without opening any of the spoilers—would they still be able to understand?

Learn More

Extra Inspiration

Last updated