Layer list

Reorderable layer panel with visibility, lock toggles, and inline rename.

Install

npx shadcn@latest add https://substrate.georgedrury.co.uk/r/layer-list

Examples

Default

Header
Hero image
CTA button
Background
"use client"

import { useState } from "react"

Interaction

  • Click a row to select it.
  • Double-click the name to rename inline. Press Enter to confirm or Escape to cancel.
  • Visibility toggle — hides/shows the layer.
  • Lock toggle — locks the layer to prevent selection or editing.

Components

ComponentDescription
LayerListVertical flex container for layer items
LayerItemRow with selection, hover, and depth indentation
LayerIconColour dot or icon thumbnail
LayerNameTruncated name with double-click-to-rename
LayerActionsRight-aligned action slot, visible on hover
LayerToggleGeneric toggle button for layer actions
LayerVisibilityToggleConvenience eye/eye-off toggle
LayerLockToggleConvenience lock/unlock toggle