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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kevinoyl/lasereyes-ui

v0.0.25

Published

Lasereyes Modal makes it easy for developers to integrate Bitcoin wallet connection flows into their applications with minimal setup. It builds on top of the `@kevinoyl/lasereyes` library to provide a convenient modal-based UI.

Readme

Lasereyes Modal

Lasereyes Modal makes it easy for developers to integrate Bitcoin wallet connection flows into their applications with minimal setup. It builds on top of the @kevinoyl/lasereyes library to provide a convenient modal-based UI.

Version license

Wallets Supported:

  • Leather
  • Magic Eden
  • OKX
  • Orange Wallet
  • OYL
  • Unisat
  • Wizz
  • Phantom
  • Xverse
  • Sparrow

Installation

You could install the Lasereyes package which contains everything lasereyes:

npm install @kevinoyl/lasereyes
# OR
yarn add @kevinoyl/lasereyes

Or you could install the Lasereyes UI package which contains the modal and the styles:

npm install @kevinoyl/lasereyes-ui
# OR
yarn add @kevinoyl/lasereyes-ui

If you installed the lasereyes package, then you can access lasereyes-ui through lasereyes/ui

import { LaserEyesModalProvider } from '@kevinoyl/lasereyes/ui';

Make sure your project uses React 18+.

Usage

The simplest way to integrate this library is by wrapping your application with <LaserEyesModalProvider>. This automatically wraps your app with <LaserEyesProvider>, allowing all child components to access the wallet state.

You can then use:

  • <ConnectWalletButton> — A pre-styled button to trigger the modal.
  • useLaserEyesModal — A hook for manually controlling the modal.
  • <ConnectWalletModal> — A component to manually render the modal.

Example Usage

import { ConnectWalletButton, LaserEyesModalProvider } from '@kevinoyl/lasereyes/ui';
import '@kevinoyl/lasereyes/ui/style.css';

function App() {
  return (
    <LaserEyesModalProvider>
      <div>
        <h1>Welcome</h1>
        <ConnectWalletButton />
      </div>
    </LaserEyesModalProvider>
  );
}

export default App;

Using useLaserEyesModal

If you want to create a custom button to open the modal, use the useLaserEyesModal hook:

import { useLaserEyesModal } from '@kevinoyl/lasereyes/ui';

function CustomWalletButton() {
  const { showModal } = useLaserEyesModal();

  return <button onClick={showModal}>Connect Wallet</button>;
}

Controlling the Modal Directly

You can also use <ConnectWalletModal> directly:

import { useState } from 'react';
import { ConnectWalletModal } from '@kevinoyl/lasereyes/ui';

function ManualModalExample() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <>
      <button onClick={() => setIsOpen(true)}>Connect</button>
      <ConnectWalletModal open={isOpen} onClose={() => setIsOpen(false)} />
    </>
  );
}

API Reference

useLaserEyesModal

interface LaserEyesModalContext {
  isOpen: boolean;
  isLoading: boolean;
  showModal: () => void;
  hideModal: () => void;
  config: LaserEyesModalConfig;
  setConfig: (config: LaserEyesModalConfig) => void;
}

<ConnectWalletModal>

| Prop | Type | Description | |---------|----------|-----------------------------------------| | open | boolean | Controls whether the modal is visible. | | onClose | function | Called when the modal should close. |

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Laser Eyes Modal on GitHub

Contributing

Contributions to Laser Eyes Modal are greatly appreciated! If you're interested in contributing to this open source project, please read the Contributing Guide before submitting a pull request.

Sponsors

If you find Laser Eyes Modal useful or use it for work, please consider sponsoring Laser Eyes. Thank you 🙏