Agent skill
nexus-elements-common
Shared Nexus Elements hooks and utilities (components/common). Use when you need common hooks like usePolling, useStopwatch, or transaction step utilities outside of the widgets.
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/nexus-elements-common
SKILL.md
Nexus Elements - Common
Overview
Use the shared hooks/utilities under components/common (polling, debouncing, transaction steps, constants) when building custom Nexus UI.
When to use
- You want to import
usePolling,useStopwatch,useTransactionSteps, or shared constants likeSHORT_CHAIN_NAME. - You are building a custom component and need the common ErrorBoundary.
Install
There is no standalone @nexus-elements/common registry item. Common files are bundled into most component registries.
Option A: Install any widget that includes common
Install a widget (fast-bridge, transfer, deposit, bridge-deposit, swaps, unified-balance, view-history). It will lay down components/common/* files.
Option B: Manual copy
Copy the files from:
registry/nexus-elements/common/*in this repo, or- Any
https://elements.nexus.availproject.org/r/<component>.jsonthat includescomponents/common/*in itsfileslist.
Usage
ts
import {
usePolling,
useStopwatch,
useTransactionSteps,
SHORT_CHAIN_NAME,
} from "@/components/common";
Notes
- Keep
components/common/index.tsintact to preserve exports. useTransactionStepspairs withNEXUS_EVENTS(STEPS_LIST,STEP_COMPLETE,SWAP_STEP_COMPLETE) for progress UIs.- These utilities are internal helpers; prefer using full widgets unless you need custom UI.
Didn't find tool you were looking for?