HANDS-ON / VS CODE

Make a presentation, together.

Start small, then add an image, layout, style and animation to the same deck.

You'll need the SlideDeck VS Code extension, a trusted workspace, and internet access for the preview. Image pasting requires VS Code 1.97 or later. Each step builds on the previous one; save your file as you go.

01 / START

Create your first slide

In VS Code, create a file named talk.slidedeck. Paste this into the empty file and save it:

{
  author: "Your Name"
  title: "My ideas"
}
===
# A small idea
This is my first SlideDeck presentation.

=== separates slides; # creates a heading. The metadata names your deck.

02 / PREVIEW

See it come to life

With the file active, click Open Preview to the Side in the editor title bar, or run SlideDeck: Open Preview to the Side from the Command Palette. Your first slide appears next to the source. Edit its text and watch the preview update; the preview follows the editor cursor to the current slide.

03 / IMAGE

Add a picture

Append this second slide at the end of the file:

===
## An idea in pictures
A picture helps tell the story.

Save the file, copy an image or screenshot, and paste it at the end of the new slide in the editor with Ctrl+V (or Cmd+V on macOS). The extension creates an img folder beside your file and inserts an image reference with a unique filename. Keep that folder with your deck. If you cannot paste an image, put an image beside the source and type a reference such as ![Picture](./picture.png) with the actual filename.

Check that the picture appears in the preview. The inserted filename will differ from anyone else's; keep your own image reference in the following steps.

04 / LAYOUT

Move and resize it

  1. On the picture slide, turn on Edit layout in the preview.
  2. Drag the picture to move it. Click it and drag the bottom-right handle to resize; hold Shift while resizing to preserve its proportions.
  3. Wait for the preview to update after each edit, then save the source. Turn off Edit layout when finished.

The editor records the position and size as {offset: '…px …px'} and {size: '…px …px'} suffixes on your image line. Your values depend on the drag. The changes carry over to generated HTML; use Undo to revert a source edit.

05 / STYLE

Give your text a frame

On the picture slide, replace the line A picture helps tell the story. with this block. Leave your image line, including its generated filename and any offset or size, unchanged below it:

::: {width: '60%'; margin: '0 auto'; background: '#e2edca'; color: '#1d2730'; padding: '20px'; border-radius: '12px'}
A picture helps tell the story.
::: end

The block gives the text a colored frame and a width. You can also use Edit layout to drag a styled block. A block's width changes its container, not necessarily the image inside it; use the image resize handle for the picture itself.

06 / ANIMATE

Reveal ideas one by one

Append this third slide at the end of your file. Each ::: {animate: "fade-in"} block becomes a fragment:

===
## What's next?
::: {animate: "fade-in"}
Start with an idea.
::: end
::: {animate: "fade-in"}
Then share it with the world.
::: end

Navigate to the slide in the preview and advance through it to reveal each line. Try adding a hover note by replacing the first line inside its fragment with:

Start with [an idea]{note: 'A little more context'}.

Hover over the marked text to see the browser tooltip. Tooltips may not be available on touch devices or through keyboard focus, so keep essential information visible.

07 / DRAW

Add a drawn annotation

On any slide in the preview, select Draw, choose the arrow tool, color and width, and drag to draw. Click Save fragments, then save the source. SlideDeck creates an SVG under img and adds a fragment; advance the presentation to reveal it.

Use Edit layout to move or resize a saved drawing as a whole, including on an unrevealed fragment. Individual arrow endpoints and presentation-time dragging are not supported. Undoing the source insertion does not delete the SVG.

08 / SHARE

Present your work

Click Generate HTML in the editor title bar to choose an output file. Or click Start Presentation to generate HTML beside your source and open a new Firefox window. You will be asked before an existing HTML file is overwritten. Configure slidedeck.browserExecutable and slidedeck.browserArguments to use another browser.

Starting a browser requires a local VS Code extension host. In a remote workspace, generate the HTML and open it locally. Generated presentations load libraries from CDNs and may require internet access.