Components
2 components available
'use client'
import { useState } from 'react'
interface Block {
id: number
label: string
color: string
colSpan: number
rowSpan: number
}
const INITIAL: Block[] = [
{ id: 1, label: 'Header', color: '#C9A84C', colSpan: 12, rowSpan: 1 },
{ id: 2, label: 'Sidebar', color: '#6366f1', colSpan: 3, rowSpan: 3 },
{ id: 3, label: 'Main ContGridLayout
GridLayout
Layouts
react
'use client'
import { useState, useRef, useCallback, useEffect } from 'react'
export default function SplitPane() {
const [split, setSplit] = useState(50)
const [dragging, setDragging] = useState(false)
const [collapsed, setCollapsed] = useState<'left' | 'right' | null>(null)
const containerRef = useRef<HTMLDivElement>(null)
const startSplitPane
SplitPane
Layouts
react