Documentation
¶
Index ¶
- func LazyColumn(content func(LazyListScope), options ...LazyListOption) compose.Composable
- func LazyHorizontalGrid(rows GridCells, content func(LazyGridScope), options ...LazyGridOption) compose.Composable
- func LazyRow(content func(LazyListScope), options ...LazyListOption) compose.Composable
- func LazyVerticalGrid(columns GridCells, content func(LazyGridScope), options ...LazyGridOption) compose.Composable
- type C
- type D
- type GridCells
- type LazyGridOption
- type LazyGridOptions
- type LazyGridScope
- type LazyGridState
- type LazyListOption
- type LazyListOptions
- type LazyListScope
- type LazyListState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LazyColumn ¶
func LazyColumn(content func(LazyListScope), options ...LazyListOption) compose.Composable
LazyColumn is a vertically scrolling list that only composes and lays out currently visible items. Note: Current implementation purely implements Lazy Layout (eager composition).
func LazyHorizontalGrid ¶
func LazyHorizontalGrid( rows GridCells, content func(LazyGridScope), options ...LazyGridOption, ) compose.Composable
LazyHorizontalGrid is a horizontally scrolling grid that lays out items in rows. The rows parameter determines how items are arranged vertically.
func LazyRow ¶
func LazyRow(content func(LazyListScope), options ...LazyListOption) compose.Composable
LazyRow is a horizontally scrolling list that only composes and lays out currently visible items. Note: Current implementation purely implements Lazy Layout (eager composition).
func LazyVerticalGrid ¶
func LazyVerticalGrid( columns GridCells, content func(LazyGridScope), options ...LazyGridOption, ) compose.Composable
LazyVerticalGrid is a vertically scrolling grid that lays out items in columns. The columns parameter determines how items are arranged horizontally.
Types ¶
type D ¶
type D = layout.Dimensions
type GridCells ¶
type GridCells interface {
// contains filtered or unexported methods
}
GridCells determines how cells should be arranged in a grid's cross-axis.
type LazyGridOption ¶
type LazyGridOption func(*LazyGridOptions)
LazyGridOption is a functional option for configuring lazy grids.
func WithGridModifier ¶
func WithGridModifier(m ui.Modifier) LazyGridOption
WithGridModifier applies a modifier to the grid.
func WithGridScrollbar ¶ added in v0.1.114
func WithGridScrollbar(enabled bool) LazyGridOption
func WithGridState ¶
func WithGridState(state *LazyGridState) LazyGridOption
WithGridState sets the grid state for scroll position management.
type LazyGridOptions ¶
type LazyGridOptions struct {
Modifier ui.Modifier
State *LazyGridState
Scrollbar bool
}
LazyGridOptions holds configuration for a lazy grid.
func DefaultLazyGridOptions ¶
func DefaultLazyGridOptions() LazyGridOptions
DefaultLazyGridOptions returns the default options for a lazy grid.
type LazyGridScope ¶
type LazyGridScope interface {
// Item adds a single item to the grid.
Item(key any, content compose.Composable)
// Items adds multiple items to the grid using a count and item factory.
Items(count int, key func(index int) any, itemContent func(index int) compose.Composable)
}
LazyGridScope is a DSL scope for defining grid items in a lazy grid.
type LazyGridState ¶
LazyGridState holds the state for a lazy grid, including scroll position.
func NewLazyGridState ¶
func NewLazyGridState() *LazyGridState
NewLazyGridState creates a new LazyGridState with default configuration.
func RememberLazyGridState ¶
func RememberLazyGridState(c compose.Composer) *LazyGridState
RememberLazyGridState creates or retrieves a remembered LazyGridState.
type LazyListOption ¶
type LazyListOption func(*LazyListOptions)
func WithModifier ¶
func WithModifier(m ui.Modifier) LazyListOption
func WithScrollbar ¶ added in v0.1.114
func WithScrollbar(enabled bool) LazyListOption
func WithState ¶
func WithState(state *LazyListState) LazyListOption
type LazyListOptions ¶
type LazyListOptions struct {
Modifier ui.Modifier
State *LazyListState
Scrollbar bool // enable scrollbar rendering
}
func DefaultLazyListOptions ¶
func DefaultLazyListOptions() LazyListOptions
type LazyListScope ¶
type LazyListScope interface {
Item(key any, content compose.Composable)
Items(count int, key func(index int) any, itemContent func(index int) compose.Composable)
StickyHeader(key any, content compose.Composable)
}
type LazyListState ¶
func NewLazyListState ¶
func NewLazyListState() *LazyListState
func RememberLazyListState ¶
func RememberLazyListState(c compose.Composer) *LazyListState