Choose Your Package
Drift Common is organized into three packages. Install the ones you need based on your use case:@drift-labs/common
Core utilities and clients
@drift-labs/react
React hooks and components
@drift-labs/icons
Icon components
Installation
@drift-labs/common
Core package for Drift Protocol utilities and client libraries.Peer Dependencies
You must also install these peer dependencies:@drift-labs/react
React components, hooks, and providers for Drift applications.Peer Dependencies
You must also install these peer dependencies:@drift-labs/icons
Icon components for Drift applications.The icons package is currently marked as private and is typically used as an internal dependency of
@drift-labs/react. You usually don’t need to install it separately unless you’re developing custom Drift components.Install All Packages
If you’re building a complete React application with Drift integration, install all packages together:Version Compatibility
Drift Common packages are designed to work together. Make sure you’re using compatible versions:
@drift-labs/common: 1.0.39+@drift-labs/react: 1.0.0+@drift-labs/sdk: ^2.158.0-beta.0@solana/web3.js: 1.98.0react: 19.0.3
Node.js Requirements
The@drift-labs/common package requires Node.js version ^24.x.x. Make sure your environment meets this requirement:
TypeScript Configuration
Drift Common packages are written in TypeScript. Add these settings to yourtsconfig.json for optimal compatibility:
tsconfig.json
Verify Installation
Verify your installation by importing from the packages:Next Steps
Quick Start Guide
Follow our quick start guide to build your first Drift application