pip-it-up v0.3.0
Get Started
pip-it-up
npm i @pip-it-up/react Copied!

UI, now Picture-in-Picture.

Everything for Picture-in-Picture

Pop Up UI component as a Picture-in-Picture window.
Zero config. Live style sync. Built for modern frameworks.

Loading editor...

Everything you need for PiP

A comprehensive API designed for real-world use cases — from simple pop-outs to route-persistent editor workflows.

new

Tested in Real Browsers

An end-to-end suite runs on Chrome, Firefox, WebKit, real Safari and Next.js SSR. Bugs it found are fixed in 0.3.0.

new

Honest Errors

open() rejects when a browser refuses, with typed ERR_* codes. Cancel a pending open and it aborts cleanly.

Route-Persistent PiP

Wrap the app in PipProvider, drop a PipAnchor per route. The PiP window survives navigation — no unmount, no reload.

Zero Remounts

Video playheads, canvas bitmaps, WebGL contexts and WebRTC streams keep running. The DOM node is moved, never recreated.

Automatic PiP

useAutoPip pops out the moment the tab is hidden, and reports whether a gesture or the browser paid for it.

Dormancy Hooks

useDormancy and useAdaptiveInterval throttle work when content is parked or backgrounded. Zero timers when frozen.

Zero Layout Shift

Anchors reserve the exact box the content left behind, in the first painted frame. Nothing jumps when it pops out or returns.

Live Style Sync

MutationObserver keeps styles, themes, and CSS-in-JS changes synced in real time.

Controlled & Uncontrolled

Works both ways — industry-standard API with open prop for full state control.

Move / Clone / Portal

Three DOM strategies. Move preserves state, portal keeps component tree intact.

Auto-sizing & Responsive

Windows adapt to content size automatically. Use isInsidePip for responsive PiP layouts.

Keyboard Forwarding

Cmd+S, Cmd+K, and all shortcuts keep working inside the PiP window.

Graceful Fallbacks

A single <video> uses native Video PiP on Safari and iOS. Otherwise a new tab, or your custom handler (e.g. a modal).

SSR-Safe

Works in Next.js, Remix, and Vite out of the box. No hydration mismatches.

Decoupled Triggers

Named registry lets any trigger connect to any wrapper — no shared context needed.

TypeScript-First

Generic-typed hooks, full IntelliSense, zero type casting needed.

Works with real editors

Tiptap, Monaco, CodeMirror — pop out any editor while preserving state, undo history.

RECIPES

Want to see more recipes?

We have pre-built examples and detailed recipes for almost every common developer requirement.

Fixed-size PiPPortal modeTheme syncKeyboard shortcutsFallbacksControlled mode
Explore recipes

Dead simple integration

Wrap your component, code lines, a trigger — you're done.

import { PipWrapper, PipTrigger } from '@pip-it-up/react';
export function App() {
return (
<PipWrapper copyStyles="sync">
<PipTrigger />
<MyEditor />
</PipWrapper>
);
}

Browser Support

Built on the Document PiP API with graceful fallbacks.

COMPATIBILITY
SECURE
Browser Version Status
Chrome / Edge 116+ ✓ Document PiP
Firefox 151+ ✓ Document PiP
Safari (macOS, iOS) Video PiP only ⚠ Video PiP fallback
Mobile Chrome / Firefox Varies ⚠ Video PiP fallback

* Requires HTTPS and a user gesture (click/keypress) to open. Where Document PiP is missing, content holding a single <video> uses native Video PiP; otherwise pip-it-up opens a popup tab or runs your own fallback. Tested end to end in Chrome, Firefox, WebKit and Safari.

How it compares

A complete solution — if your wrapper exceeds browser API.

VS OTHERS
FEATURES
Feature @pip-it-up/react react-pip picture-in-picture
Document PiP API ✓ ~ ~
Style sync (live) ✓ ✗ ✗
Portal mode ✓ ✗ ✗
Controlled + uncontrolled ✓ ✗ ✗
Decoupled trigger ✓ ✗ ✗
Keyboard forwarding ✓ ✗ ✗
Fixed-size guard ✓ ✗ ✗
SSR-safe ✓ ~ ~
Framework-agnostic core ✓ ✗ ✗
TypeScript-first ✓ ~ ✗

Roadmap

Follow our dotted trail to the future of Picture-in-Picture.

TREASURE MAP

Seamless video, canvas & WebRTC PiP

Done

The same DOM node moves into the window and back, so video keeps playing. With PipProvider, content parked between routes uses moveBefore() where the browser has it, so iframes do not reload.

Route-persistent PiP & automatic PiP

Done

PipProvider / PipAnchor keep the window alive across navigation, and useAutoPip pops out when the tab is hidden.

Real-browser end-to-end testing

Done

Chrome, Firefox, WebKit, real Safari and Next.js SSR. 0.3.0 ships the fixes it found.

Vue and Svelte bindings

Planned

@pip-it-up/vue and @pip-it-up/svelte.

Angular bindings

Planned

@pip-it-up/angular.

v1.0 stable release

Planned

Locked API and full browser matrix testing. The API can still change before v1.0.

Have a feature request or want to contribute? Open an issue on GitHub →