Skip to main content

Schema Reference

Adaptive Slide schemas use JSON Schema Draft 2020-12. The source files are maintained in the repository under schemas.

Deck

Source: schemas/deck.schema.json

PropertyTypeRequiredNotes
$schemastringYesURI reference to the schema.
type"AdaptiveDeck"YesDeck discriminator.
versionsemver stringYesPattern allows major.minor or major.minor.patch.
metadataobjectNoTitle, description, author, tags, language, and dates.
themeobjectNoColor, font, and dark-mode defaults.
defaultsobjectNoDefault layout, transition, and padding.
slidesAdaptiveSlide[]YesOrdered slide array with at least one slide.

Slide

Source: schemas/slide.schema.json

PropertyTypeRequiredNotes
type"AdaptiveSlide"YesSlide discriminator.
idstringNoStable slide identifier.
titlestringNoUsed by navigation and slide lists.
notesstringNoSpeaker notes.
layoutLayoutConfigNoOverrides deck defaults.
backgroundBackgroundNoColor, image, or gradient.
transitionenumNonone, fade, slide-left, slide-right, slide-up, or zoom.
bodyAdaptiveTile[]YesOrdered tile bucket.
actionsAction[]NoLinks, submit actions, and slide navigation.

Layout

PropertyTypeNotes
modestack, grid, or freeformDefaults to stack.
columnsinteger, 1 through 12Used by grid layout.
gapnone, small, default, or largeControls tile spacing in grid contexts.
horizontalAlignmentleft, center, right, or stretchDefaults to stretch.
verticalAlignmenttop, center, or bottomDefaults to top.

Background

ShapeRequired fieldsNotes
ColorcolorAny string accepted by the schema.
Imageimage.urlURL must validate as a URI. Optional fillMode and opacity.
Gradientgradient.type, gradient.colorsAt least two colors. Optional angle.

Tile base

Source: schemas/tile.schema.json

All tile types share these base properties:

PropertyTypeNotes
typestringDiscriminator. Required on every tile.
idstringUnique within a slide when supplied.
isVisiblebooleanDefaults to true. Hidden tiles render as empty output.
spacingenumnone, small, default, medium, large, extraLarge, or padding.
separatorbooleanAdds a separator before the tile when supported by the renderer.
gridPositionobjectcolumn, row, columnSpan, and rowSpan.
freeformPositionobjectx, y, width, height, optional rotation, and optional zIndex.

Built-in tiles

TileRequired fieldsCommon optional fieldsSource
Tile.Texttype, textstyle, size, weight, color, horizontalAlignment, wrap, maxLines, fontTypetext-tile.schema.json
Tile.Imagetype, urlaltText, size, horizontalAlignment, backgroundColor, aspectRatio, captionimage-tile.schema.json
Tile.Codetype, codelanguage, showLineNumbers, startLineNumber, highlightLines, maxHeight, title, themecode-tile.schema.json
Tile.Charttype, chartType, datatitle, showLegend, showGrid, colors, aspectRatiochart-tile.schema.json
Tile.Mediatype, sourcesposter, altText, autoplay, loop, muted, aspectRatiomedia-tile.schema.json
Tile.Containertype, itemslayout, style, bleed, minHeight, verticalContentAlignment, backgroundImagecontainer-tile.schema.json

Actions

ActionRequired fieldsAdditional fields
Action.OpenUrltype, titleurl
Action.Submittype, titledata
Action.GoToSlidetype, titletargetSlideId
Action.NextSlidetype, titleNone
Action.PrevSlidetype, titleNone

Validation command

npm run validate

The validation script is the fastest way to confirm that schema changes still accept the example deck.