Slide transitions for Marp have made stably available now! #168
Replies: 7 comments 6 replies
-
very cool |
Beta Was this translation helpful? Give feedback.
-
Hi I just can't get this to work sorry. I did :
but only the initial fade transition seems to work.
@marp-team/marp-cli v2.2.2 (w/ user-installed @marp-team/marp-core v2.4.2) Chrome Version 108.0.5359.124 (Official Build) (64-bit) |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
does this transition feature support in vs code extension? I have tried but in Preview Pane I cant see any transition. using like below. vs code: 1.86 ---
marp: true
transition: fade
theme: gaia
paginate: true
backgroundColor: #ffa
footer: '**@xkeshav**'
---
|
Beta Was this translation helpful? Give feedback.
-
Just FYI, mozilla/standards-positions#677 (comment) has been marked as completed. Does that mean this works with Firefox now? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Does Marp support in-slide animations? Like having text appear on the slide on-click, without changing the slide. |
Beta Was this translation helpful? Give feedback.
-
Slide transitions are available in Marp CLI v2.4.0+ or Marp for VS Code v2.5.0+, with Chrome 111+ or Safari 18+.
In the latest Marp, you can easily add transition effects working on HTML presentation (
bespoke
template) to your Markdown slides, powered by View Transitions API.Prerequisite
The slide transition depends on View Transitions API in the using browser. To show transition effects, a viewer has to show HTML slide in the browser which have supported View Transitions API.
Example:
fade
transitionBoth of Marp CLI and Marp for VS Code have supported
transition
local directive.Marp CLI example (by the Marp maintainer: https://yhatt.github.io/marp-cli-example/) has a fade transition in every pages.
33 built-in transitions
Marp has built-in 33 transition effects out of the box, and you can change the kind of transitions with the directive.
You can see all of these transition effects in action on the documentation of Marp CLI, or auto-completion help for
transition
local directive provided by Marp for VS Code.Define custom transitions
You also can define the custom transitions and animations, both in theme CSS and Markdown inline style. We provide unlimited extensibility of your own transitions with your creativity.
Morphing animations
With sprinkling just a little bit of CSS, you can use morphing effects in Marp that are similar to PowerPoint's Morph or Keynote's Magic Move. It should be useful to help the audience understand the flow of things between pages.
It may sound unbelievable, but this is actually part of the web standard (proposal)!
Reduce transition effects
If the browser has detected that the viewer set a setting an operating system preference to reduce motions and animations in the interface, every effects by transitions will force to a simple
fade
animation.If you want to know details about why required this, see the article "
prefers-reduced-motion
: Sometimes less movement is more" by web.dev.Examples
I'm providing the showcase of built-in transitions, creative examples about custom transitions, and a simple example of morphing animation at Glitch.
Documentation
To see the documentations about the overall of the transition feature provided by Marp CLI
bespoke
template, check out https://github.com/marp-team/marp-cli/blob/main/docs/bespoke-transitions/README.md.Beta Was this translation helpful? Give feedback.
All reactions