npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ssgoi/core

v4.4.0

Published

Core animation engine for SSGOI - Native app-like page transitions with spring physics

Readme

SSGOI

What is SSGOI?

SSGOI brings native app-like page transitions to the web. Transform your static page navigations into smooth, delightful experiences that users love.

try this: ssgoi.dev

SSGOI Demo

✨ Key Features

  • 🌍 Works Everywhere - Unlike the browser's View Transition API, SSGOI works in all modern browsers (Chrome, Firefox, Safari)
  • 🚀 SSR Ready - Perfect compatibility with Next.js, Nuxt, SvelteKit. No hydration issues, SEO-friendly
  • 🎯 Use Your Router - Keep your existing routing. React Router, Next.js App Router, SvelteKit - all work seamlessly
  • 💾 State Persistence - Remembers animation state during navigation, even with browser back/forward
  • 🎨 Framework Agnostic - One consistent API for React, Svelte, Vue, SolidJS, and more

Quick Start

Installation

# React
npm install @ssgoi/react

# Svelte
npm install @ssgoi/svelte

Add Transitions in 30 Seconds

1. Wrap your app

import { Ssgoi } from '@ssgoi/react';
import { fade } from '@ssgoi/react/view-transitions';

export default function App() {
  return (
    <Ssgoi config={{ defaultTransition: fade() }}>
      <div style={{ position: 'relative' }}>
        {/* Your app */}
      </div>
    </Ssgoi>
  );
}

2. Wrap your pages

import { SsgoiTransition } from '@ssgoi/react';

export default function HomePage() {
  return (
    <SsgoiTransition id="/">
      <h1>Welcome</h1>
      {/* Page content */}
    </SsgoiTransition>
  );
}

That's it! Your pages now transition smoothly with a fade effect.

Advanced Transitions

Route-based Transitions

Define different transitions for different routes:

const config = {
  transitions: [
    // Scroll between tabs
    { from: '/home', to: '/about', transition: scroll({ direction: 'up' }) },
    { from: '/about', to: '/home', transition: scroll({ direction: 'down' }) },
    
    // Drill in when entering details
    { from: '/products', to: '/products/*', transition: drill({ direction: 'enter' }) },
    
    // Pinterest-style image transitions
    { from: '/gallery', to: '/photo/*', transition: pinterest() }
  ],
  defaultTransition: fade()
};

Symmetric Transitions

Automatically create bidirectional transitions:

{
  from: '/home',
  to: '/about', 
  transition: scroll({ direction: 'up' }),
  symmetric: true  // Automatically creates reverse transition
}

Individual Element Animations

Animate specific elements during mount/unmount:

import { transition } from '@ssgoi/react';
import { fade, slide } from '@ssgoi/react/transitions';

function Card() {
  return (
    <div ref={transition({
      key: 'card',
      in: fade(),
      out: slide({ direction: 'up' })
    })}>
      <h2>Animated Card</h2>
    </div>
  );
}

Built-in Transitions

Page Transitions

  • fade - Smooth opacity transition
  • scroll - Vertical scrolling (up/down)
  • drill - Drill in/out effect (enter/exit)
  • hero - Shared element transitions
  • pinterest - Pinterest-style expand effect

Element Transitions

  • fade - Fade in/out
  • scale - Scale in/out
  • slide - Slide (direction: up/down/left/right)
  • rotate - Rotate
  • bounce - Bounce
  • blur - Blur
  • fly - Fly (custom x, y position)

Framework Examples

Next.js App Router

// app/layout.tsx
import { Ssgoi } from '@ssgoi/react';
import { scroll } from '@ssgoi/react/view-transitions';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <Ssgoi config={{
          defaultTransition: scroll({ direction: 'up' })
        }}>
          <div style={{ position: 'relative', minHeight: '100vh' }}>
            {children}
          </div>
        </Ssgoi>
      </body>
    </html>
  );
}

// app/page.tsx
import { SsgoiTransition } from '@ssgoi/react';

export default function Page() {
  return (
    <SsgoiTransition id="/">
      {/* Your page content */}
    </SsgoiTransition>
  );
}

SvelteKit

<!-- +layout.svelte -->
<script>
  import { Ssgoi } from '@ssgoi/svelte';
  import { fade } from '@ssgoi/svelte/view-transitions';
</script>

<Ssgoi config={{ defaultTransition: fade() }}>
  <div style="position: relative; min-height: 100vh;">
    <slot />
  </div>
</Ssgoi>

<!-- +page.svelte -->
<script>
  import { SsgoiTransition } from '@ssgoi/svelte';
  import { page } from '$app/stores';
</script>

<SsgoiTransition id={$page.url.pathname}>
  <!-- Your page content -->
</SsgoiTransition>

Why SSGOI?

vs View Transition API

  • ✅ Works in all browsers, not just Chrome
  • ✅ More animation options with spring physics
  • ✅ Better developer experience

vs Other Animation Libraries

  • ✅ Built specifically for page transitions
  • ✅ SSR-first design
  • ✅ No router lock-in
  • ✅ Minimal bundle size

How It Works

SSGOI intercepts DOM lifecycle events to create smooth transitions:

  1. Route Change: Your router changes the URL
  2. Exit Animation: Current page animates out
  3. Enter Animation: New page animates in
  4. State Sync: Animation state persists across navigation

All powered by a spring physics engine for natural, smooth motion.

Live Demos

Try out SSGOI with our framework-specific demo applications:

React Demo

pnpm react-demo:dev
# Opens at http://localhost:3001

Explore Next.js App Router integration with various transition effects.

Svelte Demo

pnpm svelte-demo:dev
# Opens at http://localhost:5174

See SvelteKit integration with smooth page transitions.

Visit the /apps directory to explore the demo source code and learn how to implement SSGOI in your own projects.

Documentation

Visit https://ssgoi.dev for:

  • Detailed API reference
  • Interactive examples
  • Framework integration guides
  • Custom transition recipes

Contributing

We welcome contributions! Please see our contributing guide for details.

License

MIT © MeurSyphus