pip-it-up
Public Beta · v0.1.8

pip-it-up
Picture-in-Picture

Pop any UI component into a floating Picture-in-Picture window. Zero config. Auto-sizing. Framework-agnostic core.

$ npm i @pip-it-up/react Copied!
live-demo.tsx
149 charsPiP Unavailable

⚠️ Your browser doesn't support Document PiP. Try Chrome 116+ or Edge 116+.

Everything you need for Picture-in-Picture

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

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

Firefox & Safari fallback to 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.

Tiptap Editor
tiptap + starter-kitauto-sizing: active · styles: sync

Rich text — formatting, lists, and blockquotes all survive the pop-out.

Monaco Editor
Loading editor...
HTMLauto-sizing: active · resize: event

Code editor — onPipWindowReady triggers editor.layout()

Want to see more?

Fixed-size PiPPortal modeTheme syncKeyboard shortcutsFallbacksControlled mode
Explore all examples

Dead simple integration

Wrap your component, drop in 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 Picture-in-Picture API with graceful fallbacks.

Browser Version Status
Chrome
116+ Full Support
Edge
116+ Full Support
Firefox
N/A Fallback
Safari
N/A Fallback

Requires HTTPS and a user gesture (click or keypress) to open the PiP window.

How it compares

A complete solution — not just a wrapper around the browser API.

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

What's coming next

We are actively iterating towards our stable v1.0 release. Here is what we are building.

Seamless Video & Canvas PiP

DOM node identity preserved across open/close. Keep WebRTC streams, canvas animations, and video playheads perfectly running without restarts.

Active Development

Vue & Svelte Bindings

Provide native `@pip-it-up/vue` and `@pip-it-up/svelte` bindings with standard ref controllers, hooks, and slots for full ecosystem support.

Planned

Angular Bindings

Provide native `@pip-it-up/angular` directive and service architecture for complete support across enterprise Angular applications.

Planned

v1.0 Stable Release

API freeze, full browser matrix automated integration testing, accessibility compliance audits, and production-grade optimization.

Planned

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