Skip to main content

Quick Installation

Get up and running with the layermetry SDK in your Next.js application.
This page still describes the version 1 setup. In version 2 (@layermetry/media-editor 2.0.0) React is no longer pinned to 18.2.0 — React 18 and React 19 both work, and the editor also runs with no React at all, so Next.js 15 is fine.Follow Installation for the version 2 setup. This page is being rewritten.

1. Install the Package

2. Install Dependencies

Version 2 works in React 18 and React 19, so any Next.js version is fine. It also works with no React at all. If you pinned react@18.2.0 for version 1, remove the pin.

3. Configure Next.js

Create or update next.config.js:
next.config.js

4. Import SDK Styles

Add to app/globals.css:
app/globals.css

5. Create Your First Editor

app/studio/page.tsx:

6. Get Your License Key

Contact your account manager or email support@layermetry.com to obtain your license key. Replace YOUR_LICENSE_KEY_HERE with your actual JWT license key.

Next Steps

ImageEditor Integration

Complete guide for integrating the ImageEditor component

VideoEditor Integration

Complete guide for integrating the VideoEditor component

API Reference

Detailed API documentation for all components

Troubleshooting

Common issues and solutions

Demo Application

Check out our example Next.js application in the SDK package at examplenextjs/ for a complete working implementation with:
  • Landing page with studio selection
  • Image Studio with drag-and-drop
  • Video Studio with export modal
  • Custom branded theme implementation
  • Proper file handling and state management

Support

Need help? We’re here for you:
For production deployments, make sure to use environment variables for your license key and API URL.