On this page ▾
Upgrading from 1.x to 2.0
slide.ng 2.0 needs the same Node (22.22.3 or newer) and the same Angular (22.2) as 1.x. Update the package in the deck's folder:
npm install -D @slide-ng/core@^2.0.0
npx slide-ng dev
Then read the warnings in the terminal and step through the deck once. Most decks need no change. The list below is what can alter a deck that 1.x showed correctly, and how to keep the old behaviour.
Changes that can alter a deck
Addresses and links
routeAlias: overview,entryornotes-editstopsbuildanddev: they are pages of the app now. Rename the alias. A markdown link[x](/overview)opens the app's overview page instead of that slide, with a full page load.- A
routeAliasthat is a number, that is empty, that has/,.,?,#or\, or that is on two slides stops the build, naming the slides. - Markdown links to
httpandhttpsaddresses open in a new tab. To keep one in the same tab, write it as HTML:<a href="https://example.com">x</a>is left as written. - An
<a href="/3">written as HTML with attributes other thanclass,idorstyle, such astarget, is left as written, with a warning. In arouterMode: hashdeck it loads/3from the server. Write a markdown link,[x](3), or<slide-ng-link to="3">. A plain<a href="/3">goes to the slide, as in 1.x. - The address leaves out
?clicks=0: slide 2 at its first click is/2. An address with?clicks=0still opens.
See Links and Slide addresses.
Language
langnow also sets the locale of thedate,numberandcurrencypipes:lang: en-GBwrites "30 September 2026", andpt_brwrites1.234.567,891. Give a pipe its own locale argument to keep the old format, such as{{ day | date: 'mediumDate' : '' : 'en-US' }}.<html lang>is written in the usual spelling:lang: pt_brgivespt-BR.langpicks the language of the interface too. See Interface language.
Styling
- Attributify reads plain HTML attributes as utilities:
<table border="1">gets a border,<span font="bold">is bold,<div m="4">gets a margin.unocss: { attributify: false }in the headmatter turns it off. See UnoCSS. themeConfigis applied as CSS variables,--slidev-theme-<key>, so athemeConfig.primaryrecolourstext-primary, the progress bar and the controls. See Theme settings.- The speaker notes get the typography preset's
prosestyles: body colour and spacing.
Files next to the deck
- An
index.htmlnext toslides.mdis merged into the page: its<title>,<meta>and scripts now count, and what its<body>holds is added to the page after the slides, out of sight but read by screen readers. Rename it if it was not meant for the deck. See Your own index.html.
Clicks and code
slide-ng-click.hideandslide-ng-after.hidehide the element at its click instead of being ignored. That click counts, so the slide has one more click, andexport --with-clicksone more page.slide-ng-click-hide="3"hides at click 3 instead of at the next click, andslide-ng-click="2" slide-ng-click-hide="3"shows at click 2 and hides at click 3.- A click range written as text,
slide-ng-click="[2, 4]", is a range. In 1.x it was ignored and the element was always visible. {monaco-run}code runs in strict mode: assigning a name that was never declared stops with aReferenceError. Declare it, or setmonacoRunUseStrict: false.
See Clicks and transitions and Running code.
Loading and the screen
- Pictures of the next slides are loaded ahead.
preloadImages: falseturns it off. See Loading pictures ahead. - The screen wake lock is on by default.
wakeLock: falseturns it off; a choice already stored in the browser is kept, so a viewer who used 1.x may have to turn it on once in the settings menu.
Builds and the browser
- Several decks on one origin, such as the project sites of one GitHub Pages user, no longer share their slides, drawings and stored settings: they belong to the deck's base path. A deck at
/keeps its old keys, but settings that a deck under a sub-path stored with 1.x are not read. - A static build no longer contains the side editor, the dev server's sync and drag saving, or the
/notes-editpage. They only ever worked with the dev server. - In a PDF made by
exportorbuild --download, links to other addresses of the deck's own site, such as/file.pdf, are text without a link.
What is new
The full list is in the release notes. The new pages of this site:
- Interface language, with right-to-left decks and one deck in several languages
- Click animations and transitions of your own, see Clicks and transitions
- Progress bar
- Overview and notes pages, the sync mode menu and the click preview, see Presenter mode
- UnoCSS: attributify, variant groups,
proseand directives - Loading pictures ahead
- Accessibility
- Memory routing and
build --router-mode, see Slide addresses - Several decks in one
buildorexport, see Hosting - Slide hooks and the global context, see Layouts and components and Angular in markdown
setup/routes.tsandsetup/mermaid-renderer.ts, see Setup hooks- MCP over HTTP from the dev server, see MCP server