question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translate Y Animation Doesn't Work Transition Motion

See original GitHub issue

Can’t figure out how to animate translateY. When replacing the value with top it works fine.

    willEnter = () => {
        return {
            translateY: 100
        };
    }
    render() {
        const boxAttrs = {
            className: 'col-xs-12 col-md-4 intro-box',
        };
        return (
            <div className="intro">
                    <TransitionMotion
                        willEnter={this.willEnter}
                        styles={this.props.items.map(item => ({
                            key: item.key,
                            style: { translateY: spring(0) }
                        }))}>
                        {interpolatedStyles =>
                        <div className="row">
                            {interpolatedStyles.map(config => {
                                return <div {...boxAttrs} key={config.key} style={{...config.style}} />
                            })}
                        </div>
                        }
                    </TransitionMotion>
            </div>
        );
    }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
ticruz38commented, Nov 29, 2016

I do have the same problem, none of the transform property are supported

style: { transform: `translateX( ${spring(0)}px )`}

this give me an invalid styles supplied to TransitionMotion, though it’s valid react style props

2reactions
mhaagenscommented, Feb 27, 2017

Here’s how I use it for route transitions with translateX; https://gist.github.com/mhaagens/61f88e3fbfddbe2c00708f3ebd099be4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animation translate doesn't work properly - Stack Overflow
The image doesn't drop at all, does not transition from 0 opacity to 1 opacity. It just suddenly appears after the given duration....
Read more >
transform-translate isn't working with animation - CSS-Tricks
Hi everyone I write this code https://codepen.io/drissboumlik/full/JMgZXj/ and i've noticed that the transform isn't working until i remove ...
Read more >
An Interactive Guide to CSS Transitions - Josh W Comeau
This comprehensive guide shows how to use CSS transitions! A back-to-basics look at the fundamental building blocks we need to create ...
Read more >
Using CSS transitions - CSS: Cascading Style Sheets | MDN
CSS transitions let you decide which properties to animate (by listing them explicitly), when the animation will start (by setting a delay), ...
Read more >
CSS3 Animations with Transitions & Transforms
Also you can include both X and Y axes to tilt the element's angles. element { transition: transform 0.3s ease; }element:hover { transform:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found