Introduction

Lens Blocks is a of useful social React components for Lens Social Protocol using the official , , and .

The registry includes essentials like a (using viem/wagmi), a full-featured (with markdown, mentions, reactions, collects, tips), a , and a .

Each block deeply integrates with the Lens React SDK and handles wallet connection, signing, authentication, session lifecycle, optimistic updates, and state management out of the box.

Installation

Much like shadcn/ui itself, Lens Blocks is a registry of React components that can be installed individually using the .

The registry is part of the , so component installations can use the @lens-blocks namespace without any additional configuration. Eg:

shell
pnpm dlx shadcn@latest add @lens-blocks/login

All components hook deeply into the Lens React SDK and use wagmi for wallet connection and signing. With just a single command, multiple components and libraries are added directly to your project. Everything including wallet connection, Lens API authentication, account switching, and more is handled for you.

You can add a full Lens login flow to your app in minutes:

typescript
import { LensLogin } from "@/components/account/lens-login";import { useSessionClient } from "@lens-protocol/react";import { useWalletClient } from "wagmi";
export function Login() {  const session = useSessionClient();  const wallet = useWalletClient();
  return <LensLogin session={session} wallet={wallet} />;}

View the on the website for more detailed usage instructions.

Documentation

View the for more detailed installation instructions and to see all available blocks, components, hooks, and libraries.

Usage

Lens Blocks is currently in beta and subject to change. It's not recommended to use the components in production yet.

Contributing

Not yet open to contributions during initial development. Feedback and suggestions are welcome!