ds.Designer
DocsExamplesPricingContact
Get Started
Welcome
  • Introduction
  • Pricing
  • License
  • ChangelogUpdated
Guides
  • Installation
  • Update GuideUpdated
Concepts
  • Designer
  • LayersUpdated
  • ThemingUpdated
  • Unit System
  • KeybindingsUpdated
  • Essential Hooks
  • Type SafetyNew
Examples
  • All Examples
  • Basic Editor
  • Header
  • Panels
  • Panes
  • Toolbar
  • Custom Toolbar
  • Print & PDF
  • Unit System
  • Blob Editor
  • Designer Tool
  • Export Layers
  • Frame Size
  • History
  • Image Generator
  • Custom Layer
  • Layer Tree
  • Mobile
  • Mode
  • Pages
  • Performance
  • Read Only
  • Save to Database
  • Zoom
Reference
  • Designer
  • Actions
  • Toolbar
  • UI
  • Other
  • Hooks
  • Types

Export Layers

PreviousNext

How to export the layers as JSON.

The useLayers hook returns the layers object. It contains the layers and the styles for each layer at the current state.

import { useLayers } from "@shadcn/designer"
 
const layers = useLayers()
The examples are best viewed in full screen. Click here to open in new tab.

You can use this to export the layers as JSON.

Designer ToolFrame Size
shadcn © 2026. All rights reserved.