Comments (9)
For per-slide animations, I was imagining something more like how layouts work for components, e.g.
import { Fade } from 'mdx-deck/animations'
export default Fade
# Fade In/Out
---
# No animation
For all slides, the other thing I'm thinking is adding a default CSS animation to a theme, maybe something like:
// example theme
import baseTheme from 'mdx-docks/themes'
export default {
...baseTheme,
animationDuration: '.4s',
animationEnter: {
from: {
opacity: 0
},
to: {
opacity: 1
}
},
animationLeave: {
// ...animation keyframes
}
}
from mdx-deck.
I like the idea of adding to the theme. I'm a bit confused by export default Fade
, though - if I already have a layout on that slide, I thought ES6 exports could have only one default?
from mdx-deck.
I've started looking at this, one thing I can't quite get is why all the styled components are using a function call type of construction rather than the more common tagged template literal construction - @jxnblk are you able to shed some light?
from mdx-deck.
Thanks! Yeah, I suspect custom animations could maybe be handled with components that can be exported as layouts (using CSS animations, etc) or maybe through custom theme configurations. I haven't thought a ton about it yet, so would like to see some proposals/APIs before moving forward with this sort of thing – as for the syntax, I find it easier to read and type in JS as opposed to using an embedded DSL
from mdx-deck.
How do you feel about export { fade as animation } from 'mdx-deck/animations'
?
from mdx-deck.
Yeah, I don't yet understand how default exports could accommodate both a custom layout and a specific slide transition.
from mdx-deck.
You can use composition in React/JSX to nest one component inside the other
from mdx-deck.
I attempted to get something like this working as a Layout but the problem is that Layouts don't receive any of their parent props, so there's no way to know when the slide is active
to fade in (since all slides are rendered already, just positioned off screen). I began exploring whether the slide animation can be moved into the Slide component but figured I'd ask if there's a better idea.
from mdx-deck.
Since v2 now uses Reach Router, slides do not transition by default. In order to add route transitions, existing solutions for Reach Router should work
from mdx-deck.
Related Issues (20)
- Integrating the presentation into existing website causes number of issues
- gatsby-theme-mdx-deck not working
- Running mdx-deck <filename>.mdx constantly forces a repaint in the browser and the recreation of gatsby pages. HOT 10
- Simple create, resize and fill div
- Presenter mode inaccessible in Windows HOT 3
- Infinite loop when using steps HOT 6
- Readme Clarity
- File-Import in 4.1.1 not working
- Can't start mdx-deck on localhost HOT 1
- Still supported/maintained? HOT 8
- Is there a way to run custom javascript on deck load and slid transitions ? HOT 3
- Can't resolve 'mdx-deck/themes' HOT 2
- Is there support for remark plugins?
- Can this be used with Next.Js HOT 2
- Trying to get in touch with you regarding a security issue
- Import partial slide decks? HOT 4
- Upgrade Gatsby to v3? HOT 2
- "Getting Started" steps do not work HOT 4
- Need custom shortcuts
- Not running on Gatsbyjs 4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdx-deck.