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

@thenamespace/ens-components-v2

v0.3.0

Published

Production-ready React components, hooks, and contract actions for integrating ENS v2 into React applications.

Downloads

305

Readme

ENS Components

A growing collection of production-ready React components, hooks, and contract actions for integrating ENS v2 into React applications.

ENS v2 support is currently limited to the Sepolia testnet configuration. The "mainnet" network value is reserved but is not implemented yet.

Features

  • Complete resolver, commit, wait, approve, register, and primary-name flow
  • Complete ERC-20 name renewal flow
  • Permission-aware ENS profile record editor
  • Configured payment-token selection with resumable state
  • Dialog and inline registration presentations
  • TanStack Query hooks for availability, pricing, profiles, and payment status
  • Framework-independent actions returning neverthrow results
  • Resumable registration flow

Installation

Install the package and its Web3 peers:

npm install @thenamespace/ens-components-v2 @tanstack/react-query@^5 viem@^2.55.0 wagmi@^2.19.5

The package requires React and React DOM 19.2.7 or later, TanStack Query 5, Viem 2.55 or later, and Wagmi 2.19.5 or later. Tailwind CSS is not required in the consuming application.

Styles

Import the precompiled package stylesheet once at the application root:

@import "@thenamespace/ens-components-v2/styles.css";

The stylesheet contains the compiled UI Kit styles and every utility used by ENS Components. No Tailwind installation, configuration, or source scanning is required.

Package exports

Import components, providers, data, and shared helpers from the package root:

import { EnsProvider, NameRegistration } from "@thenamespace/ens-components-v2";

Use the dedicated entry points for actions, query hooks, and icons:

import { prepareNameAvailabilityRead } from "@thenamespace/ens-components-v2/actions";
import { useNameAvailability } from "@thenamespace/ens-components-v2/hooks";
import { getAddressIcon } from "@thenamespace/ens-components-v2/icons";

Actions, hooks, and icons are not re-exported from the package root.

Providers

Hooks and components require Wagmi, TanStack Query, and EnsProvider:

"use client";

import type { ReactNode } from "react";

import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { EnsProvider } from "@thenamespace/ens-components-v2";
import { createConfig, http, WagmiProvider } from "wagmi";
import { sepolia } from "wagmi/chains";
import { injected } from "wagmi/connectors";

const queryClient = new QueryClient();

const wagmiConfig = createConfig({
  chains: [sepolia],
  connectors: [injected()],
  transports: {
    [sepolia.id]: http(),
  },
});

export function Providers({ children }: { children: ReactNode }) {
  return (
    <WagmiProvider config={wagmiConfig}>
      <QueryClientProvider client={queryClient}>
        <EnsProvider config={{ network: "testnet" }}>{children}</EnsProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
}

Your application must also provide a wallet connection interface.

Use the same built-in configuration with direct actions:

import { getEnsNetworkConfiguration } from "@thenamespace/ens-components-v2";

const { chain, contracts } = getEnsNetworkConfiguration("testnet");

Name registration

Render the complete registration flow as a dialog:

import { NameRegistration } from "@thenamespace/ens-components-v2";

export function RegisterName() {
  return <NameRegistration />;
}

Use the inline presentation when the flow should remain in the page layout:

<NameRegistration
  presentation="inline"
  messages={{
    searchTitle: "Claim your onchain identity",
  }}
/>

See NameRegistration for customization, lifecycle events, defaults, and flow behavior.

Name renewal

Render the renewal flow as a dialog:

import { NameRenewal } from "@thenamespace/ens-components-v2";

export function RenewName() {
  return <NameRenewal defaultLabel="vitalik" />;
}

Use presentation="inline" to place the flow directly in a page. See NameRenewal for duration controls, lifecycle events, slots, and messages.

Profile records

Render the permission-aware profile editor:

import { NameProfileEditor, emptyNameProfileFormValues } from "@thenamespace/ens-components-v2";

<NameProfileEditor initialRecords={emptyNameProfileFormValues} name="example.eth" />;

The application supplies the initial record snapshot. The component discovers the resolver, checks the connected account's ENS v2 record permissions, reviews changes, and submits one atomic resolver multicall. See NameProfileEditor.

Documentation

Components

Providers

Hooks

Registration

Renewal

Resolver and profile

Payments and transactions

Icons

Actions