Flex
Flex stacks on small screens and splits horizontally from a breakpoint (default md), like Filament’s Flex component.
import { Flex, Section, TextInput } from '@shamar/core'
Flex.make([ Section.make('Primary').schema([TextInput.make('name')]), Section.make('Meta').schema([TextInput.make('code')]),]) .from('lg')
// Or build children via schema():Flex.make() .from('md') .schema([ Section.make('Left').grow(false).schema([/* … */]), Section.make('Right').schema([/* … */]), ])Flex
| Method | Description |
|---|---|
Flex.make(children?) | Optional initial children; default from breakpoint is md. |
.from(breakpoint) | Horizontal layout from this Tailwind-style breakpoint (e.g. md, lg). |
.grow(bool) | On a child: grow to fill (default true); false keeps fixed width. |
.schema([...]) | Replace nested children. |