ds.Designer
DocsExamplesPricingContact
Get Started
Get Started
  • Welcome
  • Pricing
  • License
  • Roadmap
  • Changelog
  • llms.txt
Concepts
  • Designer
  • Layers
  • Theming
  • Unit SystemNew
Examples
  • All Examples
  • Basic Editor
  • Header
  • Panels
  • Panes
  • Toolbar
  • Custom Toolbar
  • Print & PDFNew
  • Unit SystemNew
  • Blob Editor
  • Designer ToolNew
  • Export Layers
  • Frame Size
  • History
  • Image Generator
  • Custom Layer
  • Layer Tree
  • Mobile
  • Mode
  • Pages
  • Performance
  • Read Only
  • Save to DatabaseNew
  • Zoom
Guides
  • Installation
  • Update
  • Convert to Image
  • Image Browser
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.