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

@svar-ui/react-export-popup

v2.6.0

Published

A customizable, high-performance React Export Popup component

Readme

SVAR React Export Popup

WebsiteDocsDemos

npm License npm downloads

SVAR React Export Popup is a customizable React dialog that collects export options from the user and emits a ready-to-send export request. It ships built-in tabs for PDF, PNG, and Excel (XLSX) output, page layout and margin controls, Excel column selection, theming, localization, and a flexible API for adding your own export formats.

The component helps you quickly add a polished "Export…" experience to React applications with minimal setup. Includes TypeScript support and is compatible with React 18+ and Next.js.

✨ Key Features

  • Built-in PDF, PNG, and Excel (XLSX) export tabs
  • Page size, orientation, and layout: single, poster, booklet
  • Custom page dimensions and per-side margins
  • PDF header and footer toggles
  • Scale and fit-to-page controls
  • Excel column selection with drag-to-reorder
  • Estimated page-count hints for poster and booklet layouts
  • Custom export tabs — settingless placeholders or rich tabs with their own settings UI
  • Appearance presets: light, dark, print friendly, black & white
  • Anchored or absolute popup positioning
  • Localization with bundled languages
  • Built-in light and dark themes
  • TypeScript definitions included
  • React 18+ compatible

🚀 PRO Edition

SVAR React Export Popup is available in open-source and PRO editions. The PRO build adds extra export options and a commercial license for production projects, without changing the component API.

Visit the pricing page for licensing details, feature comparison, and free trial.

Check out the live demo to see SVAR React Export Popup in action.

:hammer_and_wrench: How to Use

Anchor the popup to a trigger element, choose which tabs to show, and handle the emitted export request through onExport:

import { useRef, useState } from 'react';
import { ExportPopup } from '@svar-ui/react-export-popup';
import '@svar-ui/react-export-popup/all.css';

export default function App() {
  const anchor = useRef(null);
  const [open, setOpen] = useState(false);

  function handleExport(request) {
    // request describes the chosen format and options, e.g.
    // { format: 'pdf', skin: 'light', paper: { size: 'auto', landscape: false } }
    fetch('/api/export', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(request),
    });
    setOpen(false);
  }

  return (
    <>
      <button ref={anchor} onClick={() => setOpen(true)}>
        Export…
      </button>
      {open && (
        <ExportPopup
          title="Export"
          tabs={['pdf', 'png', 'xlsx']}
          parent={anchor.current}
          onExport={handleExport}
          onClose={() => setOpen(false)}
        />
      )}
    </>
  );
}

By default, the popup shows the pdf and png tabs. Add the built-in xlsx tab or your own custom tabs through the tabs prop to enable Excel export and additional formats.

For further instructions, follow the detailed quick start guide.

:speech_balloon: Need Help?

Post an issue or use our community forum.

⭐ Show Your Support

If SVAR React Export Popup helps your project, give it a star. It helps other developers discover this library and motivates us to keep improving.