Re-usable browser libraries and React UI components used inside the polkadot.{js} family of Polkadot and Substrate applications. Full documentation & examples available
The @polkadot/ui library provides basic browser and framework agnostic UI components for creating apps using the polkadot{.js} libraries. It includes various components such as identity icon generators, a QR code generator/reader, and shared libraries for browser-specific functions like keyring and local storage.
To install the @polkadot/ui library, you can use a package manager like npm or yarn. Here are the steps for installation:
Open your terminal or command prompt.
Navigate to your project directory.
Run the following command to install the library:
npm install @polkadot/ui
Once the installation is complete, you can import the desired components into your project as needed. For example, to use the React Identicon component, add the following import statement to your code:
import { Identicon } from '@polkadot/ui-react';
Note that you may need to configure your bundler (e.g., webpack) to handle the imports correctly.
The @polkadot/ui library is a collection of basic UI components that can be used to create applications using the polkadot{.js} libraries. It offers various features such as identity icon generation, QR code generation/reading, and browser-specific functionalities like keyring management and local storage. With easy installation and framework agnostic components, it provides developers with the necessary tools to build user interfaces for Polkadot applications efficiently.