
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@joycostudio/transitions
Advanced tools
Plug & Play page transitions for React Router. See it in action in our demo page.
pnpm add @joycostudio/transitions
RouteTransitionManager
The main component responsible for managing route transitions. It wraps your route content and handles all transition states. It NEEDS to have anchor a ref to some element so it can be preserved on unmount. If you don't want to mess the inner children layout with a wrapper just do <div style={{ display: 'contents' }} ref={ref}>{myUltraDelicateChildren}</div>
.
<RouteTransitionManager
routes={routes}
pathname={location.pathname}
mode="out-in"
onEnter={{
default: async (node) => {
// Your enter animation
},
}}
onExit={{
default: async (node) => {
// Your exit animation
},
}}
>
{(nodeRef) => <div ref={nodeRef}>{/* Your route content */}</div>}
</RouteTransitionManager>
Props:
children
: Function that receives a ref to be attached to your route contentpathname
: Current route pathnamemode
: Transition mode ('out-in' | 'in-out')onEnter
: Record of enter animations by route or defaultonExit
: Record of exit animations by route or defaultonEntering
: Optional callbacks when entering startsonEntered
: Optional callbacks when entering completesonExiting
: Optional callbacks when exiting startsonExited
: Optional callbacks when exiting completesappear
: Whether to animate on first renderroutes
: Array of route configurationsDocumentTransitionState
A utility component that adds a data-transition-state
attribute to the document root, useful for controlling UI elements during transitions.
<DocumentTransitionState />
If you use the <DocumentTransitionState />
component. It will attach a data-transition-state
to the document's root. You can use it to disable all the links while the page is transitioning to make the experience feel more controlled.
/* Disable links during transitions */
html:not([data-transition-state='idle']) a {
pointer-events: none;
}
usePreservedLoaderData<T>()
Returns a frozen version of the loader data to prevent data changes during transitions.
const data = usePreservedLoaderData<YourDataType>()
useTransitionState()
Returns the current transition state and helper flags.
const {
state, // 'entering' | 'exiting' | 'idle'
isEntering, // boolean
isExiting, // boolean
isIdle, // boolean
} = useTransitionState()
This template comes with two GitHub Actions workflows (currently disabled for convenience):
Release Workflow (.github/workflows/release.yml
): Automates the release process using Changesets. When enabled, it will automatically create release pull requests and publish to npm when changes are pushed to the main branch.
Publish Any Commit (.github/workflows/publish-any-commit.yml
): A utility workflow that can build and publish packages for any commit or pull request.
This library uses Changesets to manage versions and publish releases. Here's how to use it:
When you make changes that need to be released:
pnpm changeset
This will prompt you to:
To create a new version and update the changelog:
# 1. Create new versions of packages
pnpm version:package
# 2. Release (builds and publishes to npm)
pnpm release
Remember to commit all changes after creating a release.
FAQs
Transitions for the ladies and gentlemen
We found that @joycostudio/transitions demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.