<!--
{
  "documentType" : "article",
  "framework" : "Swift Playgrounds",
  "identifier" : "/documentation/Swift-Playgrounds/playground-books",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Playground Books"
}
-->

# Playground Books

Create interactive Playground Book based learning experiences for the Swift Playgrounds app.

## Overview

You may create content for the [Swift Playgrounds](https://www.apple.com/swift/playgrounds/)
app by writing playground books. Like traditional books, playground books are made
up of chapters and pages. Unlike traditional books, they include executable Swift
code that displays the results live, right on the page.

The pages of a playground book can include features that you use to teach a lesson
or to encourage code experimentation. The basic building blocks you use are:

- Prose that introduces the material on the page.
- Blocks and modules of Swift code that learners can edit and expand upon.
- The always-on live view that you use to show visualizations of running the page’s
  code.

The following screenshot of a page from Learn to Code 1 shows a lesson on the left
and an interactive live view on the right.

![Screenshot showing the “Issuing Commands” playground page from Learn to Code 1.](images/com.apple.Swift-Playgrounds/swift-playgrounds-1@2x.png)

You can further enrich a playground book and tailor it to your audience by adding
cutscenes, glossaries, hints, and assessments. When you’re done writing a playground
book, you can distribute it locally in a classroom or workshop environment, or publish
it online as a subscription.

## Topics

### Playground Setup

[Creating and Running a Playground Book](/documentation/Swift-Playgrounds/creating-and-running-a-playground-book)

Build a playground book from a template, and run it in Swift Playgrounds.

[Structuring Content for Swift Playgrounds](/documentation/Swift-Playgrounds/structuring-content-for-swift-playgrounds)

Add content to a playground book by creating new folders and property lists.

### Annotations

Use annotations in Swift comments to add functionality to a page’s source editor.

[Writing Prose for a Playground Page](/documentation/Swift-Playgrounds/writing-prose-for-a-playground-page)

Add comment markers in your Swift code to mark text as prose.

[Specifying Editable Regions in a Playground Page](/documentation/Swift-Playgrounds/specifying-editable-regions-in-a-playground-page)

Guide learning by marking code that learners can change or copy forward.

[Hiding Code from a Playground Page](/documentation/Swift-Playgrounds/hiding-code-from-a-playground-page)

Use special Swift comments to hide code from display but continue to run it.

[Customizing the Completions in the Shortcut Bar](/documentation/Swift-Playgrounds/customizing-the-completions-in-the-shortcut-bar)

Guide learners toward a solution by hiding some symbols and showing others.

[Localizing Code Comments and String Literals](/documentation/Swift-Playgrounds/localizing-code-comments-and-string-literals)

In Swift Playgrounds 3.0 and later, mark up code zones to replace them with code that’s localized for the current user.

### Glossaries

[Adding a Glossary to a Playground Book](/documentation/Swift-Playgrounds/adding-a-glossary-to-a-playground-book)

Define terms in the glossary property list and reference them on playground pages.

### Hints

[Giving hints to help learners solve problems](/documentation/Swift-Playgrounds/giving-hints-to-help-learners-solve-problems)

Add hints, spoilers, and solutions to a page to help teach the material.

## See Also

  <doc://com.apple.documentation/documentation/playgroundbluetooth>

  <doc://com.apple.documentation/documentation/playgroundsupport>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)