Skip to content

Commit 40d0469

Browse files
committed
docs(uikit): polish pages and share dev libraries nav
- Refine UIKit MDX copy across architecture, components, and guides. - Treat /tools as ecosystem-aware shared paths; merge Ecosystem Adapters + UIKit from shared/developer-libraries.json to avoid nav duplication.
1 parent b74b05b commit 40d0469

17 files changed

Lines changed: 199 additions & 302 deletions

content/tools/uikit/architecture.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ flowchart TD
3939

4040
| Layer | Package | Responsibility |
4141
| --- | --- | --- |
42-
| 1 | `@openzeppelin/ui-types` | TypeScript interfaces for capabilities, schemas, form models, networks, transactions, and execution config. No runtime code pure type definitions. |
42+
| 1 | `@openzeppelin/ui-types` | TypeScript interfaces for capabilities, schemas, form models, networks, transactions, and execution config. No runtime code: pure type definitions. |
4343
| 2 | `@openzeppelin/ui-utils` | Framework-agnostic helpers: `AppConfigService` for environment/config loading, structured logger, validation utilities, and routing helpers. |
4444
| 3 | `@openzeppelin/ui-styles` | Tailwind CSS 4 theme tokens using OKLCH color space. Ships CSS variables and custom variants (dark mode). No JavaScript. |
4545
| 4 | `@openzeppelin/ui-components` | React UI primitives (buttons, dialogs, cards, tabs) and blockchain-aware form fields (address, amount, bytes, enum, map). Built on Radix UI + shadcn/ui patterns. |
@@ -50,16 +50,16 @@ flowchart TD
5050
<a id="capabilities"></a>
5151
## Capabilities
5252

53-
The UIKit type system defines 13 **capabilities** small, focused interfaces that describe what an adapter can do.
53+
The UIKit type system defines 13 **capabilities**: small, focused interfaces that describe what an adapter can do.
5454

5555
Capabilities are organized into three tiers based on their requirements:
5656

5757
```mermaid
5858
%%{init: {'flowchart': {'nodeSpacing': 30, 'rankSpacing': 30}} }%%
5959
flowchart TD
60-
T1["<b>Tier 1 Lightweight</b><br/>Addressing · Explorer · NetworkCatalog · UiLabels"]
61-
T2["<b>Tier 2 Network-Aware</b><br/>ContractLoading · Schema · TypeMapping · Query"]
62-
T3["<b>Tier 3 Stateful</b><br/>Execution · Wallet · UiKit · Relayer · AccessControl"]
60+
T1["<b>Tier 1 (Lightweight)</b><br/>Addressing · Explorer · NetworkCatalog · UiLabels"]
61+
T2["<b>Tier 2 (Network-Aware)</b><br/>ContractLoading · Schema · TypeMapping · Query"]
62+
T3["<b>Tier 3 (Stateful)</b><br/>Execution · Wallet · UiKit · Relayer · AccessControl"]
6363
6464
T1 --"may import"--> T2 --"may import"--> T3
6565
@@ -68,7 +68,7 @@ flowchart TD
6868
style T3 fill:#fff3e0,stroke:#ff9800,color:#000
6969
```
7070

71-
**Tier 1** requires no runtime context safe to import anywhere. **Tier 2** needs a `networkConfig`. **Tier 3** additionally needs wallet state and participates in the `dispose()` lifecycle. Each higher tier may import from lower tiers, but never the reverse.
71+
**Tier 1** requires no runtime context: safe to import anywhere. **Tier 2** needs a `networkConfig`. **Tier 3** additionally needs wallet state and participates in the `dispose()` lifecycle. Each higher tier may import from lower tiers, but never the reverse.
7272

7373
| Capability | Tier | Purpose |
7474
| --- | --- | --- |
@@ -90,7 +90,7 @@ For more background on the adapter pattern and how chain-specific integrations a
9090

9191
### Capability Bundles
9292

93-
Higher-level components request specific **bundles** of capabilities rather than the full set. For example, `TransactionForm` expects a `TransactionFormCapabilities` type an intersection of the capabilities needed for form rendering, execution, and status tracking.
93+
Higher-level components request specific **bundles** of capabilities rather than the full set. For example, `TransactionForm` expects a `TransactionFormCapabilities` type: an intersection of the capabilities needed for form rendering, execution, and status tracking.
9494

9595
This means you can pass a partial adapter that only implements what the component actually needs.
9696

@@ -126,8 +126,8 @@ Adapters support five standard profiles that define which capabilities are inclu
126126

127127
| Profile | Use Case | Tier 1 | Tier 2 | Tier 3 |
128128
| --- | --- | --- | --- | --- |
129-
| `declarative` | Address formatting, explorer links || | |
130-
| `viewer` | Read contract state, no wallet needed ||| |
129+
| `declarative` | Address formatting, explorer links || - | - |
130+
| `viewer` | Read contract state, no wallet needed ||| - |
131131
| `transactor` | Execute transactions, basic wallet ||| Execution, Wallet |
132132
| `composer` | Full UI with form rendering ||| ✓ (most) |
133133
| `operator` | Administrative tools, access control ||| ✓ (all) |
@@ -215,6 +215,6 @@ flowchart TD
215215

216216
## Next Steps
217217

218-
- [Components](/tools/uikit/components) Explore all available UI primitives and form fields
219-
- [React Integration](/tools/uikit/react-integration) Deep dive into providers, hooks, and wallet state
220-
- [Building New Adapters](/ui-builder/building-adapters) Background on the adapter pattern and ecosystem integrations
218+
- [Components](/tools/uikit/components): Explore all available UI primitives and form fields
219+
- [React Integration](/tools/uikit/react-integration): Deep dive into providers, hooks, and wallet state
220+
- [Building New Adapters](/ui-builder/building-adapters): Background on the adapter pattern and ecosystem integrations

content/tools/uikit/components.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ The field components are designed for use with [react-hook-form](https://react-h
7777

7878
| Field | Input Type | Use Case |
7979
| --- | --- | --- |
80-
| `AddressField` | Blockchain address | Contract addresses, recipient addresses validates format per ecosystem |
81-
| `AmountField` | Token amounts | Token transfers handles decimals and BigInt formatting |
80+
| `AddressField` | Blockchain address | Contract addresses, recipient addresses; validates format per ecosystem |
81+
| `AmountField` | Token amounts | Token transfers; handles decimals and BigInt formatting |
8282
| `BigIntField` | Large integers | Raw `uint256` values, timestamps, token IDs |
8383
| `BytesField` | Hex byte strings | Calldata, hashes, signatures |
8484
| `TextField` | Free-form text | String parameters, names, URIs |
85-
| `UrlField` | URL | Endpoint URLs, metadata URIs validates URL format |
86-
| `PasswordField` | Masked text | API keys, secrets input is hidden by default |
85+
| `UrlField` | URL | Endpoint URLs, metadata URIs; validates URL format |
86+
| `PasswordField` | Masked text | API keys, secrets; input is hidden by default |
8787
| `NumberField` | Numeric values | Counts, percentages, indices |
8888
| `BooleanField` | True/false | Feature flags, approvals |
8989
| `EnumField` | Enum selection | Contract enum parameters |
@@ -134,9 +134,9 @@ function TransferForm() {
134134

135135
UIKit provides context-driven address resolution that works automatically with `AddressField` and `AddressDisplay`:
136136

137-
- **`AddressLabelProvider`** When mounted, all `AddressDisplay` instances in the subtree auto-resolve human-readable labels (e.g. "Treasury Multisig" instead of `0x1234...abcd`).
138-
- **`AddressSuggestionProvider`** When mounted, all `AddressField` instances show autocomplete suggestions as the user types.
139-
- **`useAddressLabel(address, networkId?)`** Hook to resolve a label from the nearest provider.
137+
- **`AddressLabelProvider`**: When mounted, all `AddressDisplay` instances in the subtree auto-resolve human-readable labels (e.g. "Treasury Multisig" instead of `0x1234...abcd`).
138+
- **`AddressSuggestionProvider`**: When mounted, all `AddressField` instances show autocomplete suggestions as the user types.
139+
- **`useAddressLabel(address, networkId?)`**: Hook to resolve a label from the nearest provider.
140140

141141
## Renderer Widgets
142142

@@ -210,7 +210,7 @@ import { DynamicFormField } from '@openzeppelin/ui-renderer';
210210

211211
Displays read-only contract state by querying view functions. The widget automatically discovers all view functions from the contract schema and renders their return types. Supports auto-refresh to keep values current.
212212

213-
Each row shows the function name, return type, and live result — no wallet connection required. Pass `query` and `schema` capabilities from the active runtime:
213+
Each row shows the function name, return type, and live result. No wallet connection is required. Pass `query` and `schema` capabilities from the active runtime:
214214

215215
```tsx
216216
import { ContractStateWidget } from '@openzeppelin/ui-renderer';
@@ -233,7 +233,7 @@ import { ContractStateWidget } from '@openzeppelin/ui-renderer';
233233

234234
A full-featured address book UI for managing saved addresses and their human-readable aliases. Supports CRUD operations, search, and import/export.
235235

236-
`AddressBookWidget` works with the [`@openzeppelin/ui-storage`](/tools/uikit/storage) package specifically the **account alias plugin** which persists address-to-name mappings in IndexedDB via Dexie.js. When mounted alongside `AddressLabelProvider` and `AddressSuggestionProvider`, saved aliases automatically appear in all `AddressDisplay` and `AddressField` components throughout the app.
236+
`AddressBookWidget` works with the [`@openzeppelin/ui-storage`](/tools/uikit/storage) package, specifically the **account alias plugin** which persists address-to-name mappings in IndexedDB via Dexie.js. When mounted alongside `AddressLabelProvider` and `AddressSuggestionProvider`, saved aliases automatically appear in all `AddressDisplay` and `AddressField` components throughout the app.
237237

238238
```tsx
239239
import { AddressBookWidget } from '@openzeppelin/ui-renderer';
@@ -262,6 +262,6 @@ See the [Storage](/tools/uikit/storage) page for setup and plugin configuration.
262262

263263
## Next Steps
264264

265-
- [React Integration](/tools/uikit/react-integration) Connect components to wallet state and runtime capabilities
266-
- [Theming & Styling](/tools/uikit/theming) Customize the visual appearance
267-
- [Getting Started](/tools/uikit/getting-started) Step-by-step setup guide
265+
- [React Integration](/tools/uikit/react-integration): Connect components to wallet state and runtime capabilities
266+
- [Theming & Styling](/tools/uikit/theming): Customize the visual appearance
267+
- [Getting Started](/tools/uikit/getting-started): Step-by-step setup guide

content/tools/uikit/getting-started.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pnpm add @openzeppelin/adapter-polkadot
6363

6464
## Step 1: Configure Tailwind CSS
6565

66-
UIKit uses Tailwind CSS 4 for styling. Components ship class names but **not** compiled CSS — your application's Tailwind build must know where to find them.
66+
UIKit uses Tailwind CSS 4 for styling. Components ship class names but **not** compiled CSS. Your application's Tailwind build must know where to find them.
6767

6868
### Automated Setup (Recommended)
6969

@@ -167,7 +167,7 @@ function TransferPage({ adapter, contractSchema }) {
167167
}
168168
```
169169

170-
The `adapter` prop accepts a `TransactionFormCapabilities` object a bundle of capabilities from your active [Ecosystem Runtime](/tools/uikit/architecture#runtimes).
170+
The `adapter` prop accepts a `TransactionFormCapabilities` object: a bundle of capabilities from your active [Ecosystem Runtime](/tools/uikit/architecture#runtimes).
171171

172172
## Step 4: Wire Up React Providers
173173

@@ -215,8 +215,8 @@ For the full React integration guide, see [React Integration](/tools/uikit/react
215215

216216
## Next Steps
217217

218-
- [Architecture](/tools/uikit/architecture) Understand the package layers, capability tiers, and runtime model
219-
- [Components](/tools/uikit/components) Explore UI primitives and blockchain-aware form fields
220-
- [React Integration](/tools/uikit/react-integration) Deep dive into providers, hooks, and wallet state
221-
- [Theming & Styling](/tools/uikit/theming) Customize tokens, colors, and dark mode
222-
- [Building New Adapters](/ui-builder/building-adapters) Background on adapter packages and ecosystem integrations
218+
- [Architecture](/tools/uikit/architecture): Understand the package layers, capability tiers, and runtime model
219+
- [Components](/tools/uikit/components): Explore UI primitives and blockchain-aware form fields
220+
- [React Integration](/tools/uikit/react-integration): Deep dive into providers, hooks, and wallet state
221+
- [Theming & Styling](/tools/uikit/theming): Customize tokens, colors, and dark mode
222+
- [Building New Adapters](/ui-builder/building-adapters): Background on adapter packages and ecosystem integrations

content/tools/uikit/index.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: OpenZeppelin UIKit
33
---
44

5-
A modular React component library for building blockchain transaction interfaces chain-agnostic, capability-driven, and designed for multi-ecosystem applications.
5+
A modular React component library for building blockchain transaction interfaces. It is chain-agnostic, capability-driven, and designed for multi-ecosystem applications.
66

77
<Callout type="info">
88
**Source code**: OpenZeppelin UIKit is open-source. Browse the implementation, open issues, and contribute at [**github.com/OpenZeppelin/openzeppelin-ui**](https://github.com/OpenZeppelin/openzeppelin-ui).
@@ -21,7 +21,7 @@ A modular React component library for building blockchain transaction interfaces
2121

2222
## What is OpenZeppelin UIKit?
2323

24-
OpenZeppelin UIKit is a set of modular npm packages that provide everything needed to build rich blockchain UIs in React. Instead of a monolithic library, it ships as a **layered stack** from low-level types and utilities up to high-level form renderers and wallet integration.
24+
OpenZeppelin UIKit is a set of modular npm packages that provide everything needed to build rich blockchain UIs in React. Instead of a monolithic library, it ships as a **layered stack** from low-level types and utilities up to high-level form renderers and wallet integration.
2525

2626
Each layer is independently installable. Use only the pieces you need: the type system for a headless integration, the component library for a design system, or the full renderer for turnkey transaction forms.
2727

@@ -65,8 +65,8 @@ flowchart TD
6565

6666
| Package | Description | Layer |
6767
| --- | --- | --- |
68-
| [`@openzeppelin/ui-types`](https://www.npmjs.com/package/@openzeppelin/ui-types) | Shared TypeScript type definitions capabilities, schemas, form models | 1 |
69-
| [`@openzeppelin/ui-utils`](https://www.npmjs.com/package/@openzeppelin/ui-utils) | Framework-agnostic utilities config, logging, validation, routing | 2 |
68+
| [`@openzeppelin/ui-types`](https://www.npmjs.com/package/@openzeppelin/ui-types) | Shared TypeScript type definitions: capabilities, schemas, form models | 1 |
69+
| [`@openzeppelin/ui-utils`](https://www.npmjs.com/package/@openzeppelin/ui-utils) | Framework-agnostic utilities: config, logging, validation, routing | 2 |
7070
| [`@openzeppelin/ui-styles`](https://www.npmjs.com/package/@openzeppelin/ui-styles) | Centralized Tailwind CSS 4 theme with OKLCH tokens and dark mode | 3 |
7171
| [`@openzeppelin/ui-components`](https://www.npmjs.com/package/@openzeppelin/ui-components) | React UI primitives and blockchain-aware form fields (shadcn/ui based) | 4 |
7272
| [`@openzeppelin/ui-react`](https://www.npmjs.com/package/@openzeppelin/ui-react) | React context providers, runtime management, and wallet hooks | 5 |
@@ -85,7 +85,7 @@ flowchart TD
8585

8686
## Ecosystem Adapter Integration
8787

88-
UIKit connects to blockchains through ecosystem adapter packages standalone packages that translate chain-specific operations into the shared capability model. For more background, see [Building New Adapters](/ui-builder/building-adapters).
88+
UIKit connects to blockchains through ecosystem adapter packages, standalone packages that translate chain-specific operations into the shared capability model. For more background, see [Building New Adapters](/ui-builder/building-adapters).
8989

9090
```mermaid
9191
sequenceDiagram
@@ -117,6 +117,6 @@ For more background on how adapters work and how new ecosystem integrations are
117117

118118
## Next Steps
119119

120-
- [Getting Started](/tools/uikit/getting-started) Install, configure, and render your first form
121-
- [Architecture](/tools/uikit/architecture) Deep dive into the capability model and runtime lifecycle
122-
- [Building New Adapters](/ui-builder/building-adapters) How chain-specific logic is decoupled from the UI
120+
- [Getting Started](/tools/uikit/getting-started): Install, configure, and render your first form
121+
- [Architecture](/tools/uikit/architecture): Deep dive into the capability model and runtime lifecycle
122+
- [Building New Adapters](/ui-builder/building-adapters): How chain-specific logic is decoupled from the UI

content/tools/uikit/react-integration.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ flowchart TD
3030

3131
### RuntimeProvider
3232

33-
`RuntimeProvider` maintains a **registry of `EcosystemRuntime` instances** one per network ID. It creates runtimes on demand, caches them, and disposes all of them on unmount.
33+
`RuntimeProvider` maintains a **registry of `EcosystemRuntime` instances** (one per network ID). It creates runtimes on demand, caches them, and disposes all of them on unmount.
3434

3535
```tsx
3636
import { RuntimeProvider } from '@openzeppelin/ui-react';
@@ -87,7 +87,7 @@ function App() {
8787
| --- | --- | --- |
8888
| `initialNetworkId` | `string` | Network to activate on mount |
8989
| `getNetworkConfigById` | `(id: string) => NetworkConfig` | Resolver for network configurations |
90-
| `loadConfigModule` | `(runtime) => Promise<void>` | Optional load UI kit config modules for the runtime |
90+
| `loadConfigModule` | `(runtime) => Promise<void>` | Optional: load UI kit config modules for the runtime |
9191

9292
## Hooks
9393

@@ -168,7 +168,7 @@ These are built on top of the `walletFacadeHooks` from the active runtime's `UiK
168168

169169
### NetworkSwitchManager
170170

171-
Pass capabilities from the active runtime not a monolithic adapter instance:
171+
Pass capabilities from the active runtime, not a monolithic adapter instance:
172172

173173
```tsx
174174
import { useState } from 'react';
@@ -267,6 +267,6 @@ sequenceDiagram
267267

268268
## Next Steps
269269

270-
- [Components](/tools/uikit/components) Browse all available components and form fields
271-
- [Theming & Styling](/tools/uikit/theming) Customize the visual design
272-
- [Building New Adapters](/ui-builder/building-adapters) Background on adapter packages and ecosystem integrations
270+
- [Components](/tools/uikit/components): Browse all available components and form fields
271+
- [Theming & Styling](/tools/uikit/theming): Customize the visual design
272+
- [Building New Adapters](/ui-builder/building-adapters): Background on adapter packages and ecosystem integrations

0 commit comments

Comments
 (0)