@@ -600,7 +600,7 @@ export const GridWithScrolling: Story = {
600600 render : ( ) => (
601601 < Layout height = "300px" >
602602 < Layout . Header title = "Scrollable Grid" />
603- < Layout . Grid gap = "1x" >
603+ < Layout . Grid gap = "1x" flow = "column" padding = "1x" >
604604 { Array . from ( { length : 16 } , ( _ , i ) => (
605605 < Card key = { i } width = "100px" height = "80px" whiteSpace = "nowrap" >
606606 Card { i + 1 }
@@ -661,3 +661,98 @@ export const CollapsedWithWarning: Story = {
661661 </ Block >
662662 ) ,
663663} ;
664+
665+ /**
666+ * Layout.Pane allows creating resizable inline sections within a layout.
667+ * Unlike Layout.Panel (which is absolutely positioned), Pane participates
668+ * in the normal flex/grid flow and can be resized via drag handles.
669+ */
670+ export const ResizablePanes : Story = {
671+ render : function ResizablePanesRender ( ) {
672+ const [ leftSize , setLeftSize ] = useState ( 250 ) ;
673+ const [ middleSize , setMiddleSize ] = useState ( 400 ) ;
674+
675+ return (
676+ < Layout height = "100dvh" >
677+ < Layout . Header
678+ title = "Resizable Panes"
679+ subtitle = "Drag the handles between panes to resize"
680+ />
681+ < Layout . Flex >
682+ < Layout . Pane
683+ isResizable
684+ resizeEdge = "right"
685+ size = { leftSize }
686+ minSize = { 150 }
687+ maxSize = { 400 }
688+ fill = { { '' : '#white' , 'drag | focused' : '#light' } }
689+ onSizeChange = { setLeftSize }
690+ >
691+ < Title level = { 5 } > Left Pane</ Title >
692+ < Text > Width: { leftSize } px</ Text >
693+ < Text preset = "t3" color = "#dark-02" >
694+ Drag the right edge to resize. Double-click to reset.
695+ </ Text >
696+ </ Layout . Pane >
697+
698+ < Layout . Pane
699+ isResizable
700+ resizeEdge = "right"
701+ size = { middleSize }
702+ minSize = { 200 }
703+ fill = { { '' : '#white' , 'drag | focused' : '#light' } }
704+ onSizeChange = { setMiddleSize }
705+ >
706+ < Title level = { 5 } > Middle Pane</ Title >
707+ < Text > Width: { middleSize } px</ Text >
708+ < Text preset = "t3" color = "#dark-02" >
709+ This pane has no maximum size constraint.
710+ </ Text >
711+ </ Layout . Pane >
712+
713+ < Layout . Content fill = "#light" width = "min 150px" >
714+ < Title level = { 5 } > Flexible Content</ Title >
715+ < Text > This area fills the remaining space.</ Text >
716+ </ Layout . Content >
717+ </ Layout . Flex >
718+ </ Layout >
719+ ) ;
720+ } ,
721+ } ;
722+
723+ /**
724+ * Panes can also be resized vertically using the bottom edge.
725+ */
726+ export const VerticalResizablePanes : Story = {
727+ render : function VerticalResizablePanesRender ( ) {
728+ const [ topSize , setTopSize ] = useState ( 200 ) ;
729+
730+ return (
731+ < Layout height = "100dvh" >
732+ < Layout . Header title = "Vertical Panes" />
733+ < Layout . Flex flow = "column" flexShrink = { 1 } >
734+ < Layout . Pane
735+ isResizable
736+ resizeEdge = "bottom"
737+ size = { topSize }
738+ minSize = { 100 }
739+ maxSize = { 400 }
740+ fill = "#light"
741+ onSizeChange = { setTopSize }
742+ >
743+ < Title level = { 5 } > Top Pane</ Title >
744+ < Text > Height: { topSize } px</ Text >
745+ < Text preset = "t3" color = "#dark-02" >
746+ Drag the bottom edge to resize.
747+ </ Text >
748+ </ Layout . Pane >
749+
750+ < Layout . Content fill = "#white" flexShrink = { 0 } >
751+ < Title level = { 5 } > Bottom Content</ Title >
752+ < Text > This area fills the remaining vertical space.</ Text >
753+ </ Layout . Content >
754+ </ Layout . Flex >
755+ </ Layout >
756+ ) ;
757+ } ,
758+ } ;
0 commit comments