
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
react-page-transitions
Advanced tools
Page tranistions for ReactJS based on VelocityJS library. Mobile friendly. High performance.
DEMO!
Page tranistions for ReactJS based on VelocityJS library. Mobile friendly. High performance.
1.2.0
<PageContainer className="some-test-class">
<div>....</div>
</PageContainer>
1.1.0
Install: npm install react-page-transitions
var React = require('react/addons');
var PageContainer = require('react-page-transitions');
var PageTest = React.createClass({
render: function () {
return (
<PageContainer>
<div>....</div>
</PageContainer>
);
}
});
module.exports = PageTest;
You can use custom parameters to set start and end styles. In example:
render: function () {
var startStyles = {
'opacity': 0,
'scale': .5
};
var endStyles = {
'opacity': 1,
'scale': 1
};
var duration = 1000;
var easing = 'easeInExpo';
var callback = function() {
alert('Done');
};
return (
<PageContainer
startStyles={startStyles}
endStyles={endStyles}
duration={duration}
easing={easing}
callback={callback}
>
<div>....</div>
</PageContainer>
);
}
module.exports = PageTest;
Velocity currently doesn't support multiple hooks in one call so what I'm doing is:
Without this parameters it will just go with defaults (TranslateX from 100% to 0).
For mobile I suggest to use this so animation will be affecting whole page:
render: function () {
return (
<PageContainer>
<div className="content">....</div>
</PageContainer>
body, .page-content, .content {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
// For webkit scroll touch
.loaded-page.content {
overflow: auto;
-webkit-overflow-scrolling: touch;
overflow-x: hidden;
}
Component renders with display none property. On componentDidMount I'm using Velocity hook to set translateX -100% to the container. Add child component. Set display block. Start VelocityJS animation to translateX 0. After that I'm also adding loaded-page class to container in case you want to use webkit scroll touch.
FAQs
Page tranistions for ReactJS based on VelocityJS library. Mobile friendly. High performance.
We found that react-page-transitions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.