Package-level declarations

Types

Link copied to clipboard
data class FormConfig(val labelStyle: FormLabelStyle, val sectionStyle: FormSectionStyle, val dividerStyle: FormDividerStyle, val spacing: Dp, val shape: Shape, val showSingleDropdownsAsText: Boolean, val popupWidthConfig: StyledPopupMenu.WidthConfig)
Link copied to clipboard
Link copied to clipboard
data class FormDividerStyle(val color: Color, val thickness: Dp, val textStyle: TextStyle, val textColor: Color, val textSpacing: Dp, val verticalSpacing: Dp, val textAlignment: Alignment.Horizontal)
Link copied to clipboard
sealed class FormLabelStyle
Link copied to clipboard
sealed class FormSectionStyle

Functions

Link copied to clipboard
fun MyForm(items: List<FormItem>, modifier: Modifier = Modifier, scrollable: Boolean = true, config: FormConfig = rememberFormConfig(), itemKey: (FormItem) -> Any? = FormDefaults.simpleKeyProvider())

itemKey must return a unique, stable ID independent of an item's value or visibility. When supplied, inserted and removed items animate; removed items remain until their exit completes. Without itemKey, items retain the positional rendering behavior.

Link copied to clipboard
fun rememberFormConfig(labelStyle: FormLabelStyle = FormDefaults.labelStyleBefore(), sectionStyle: FormSectionStyle = FormDefaults.sectionStyleText(), dividerStyle: FormDividerStyle = FormDefaults.dividerStyle(), spacing: Dp = StyledTheme.spacing.medium, shape: Shape = StyledTheme.shapes.small, showSingleDropdownsAsText: Boolean = false, popupWidthConfig: StyledPopupMenu.WidthConfig = StyledPopupMenuDefaults.widthConfig): FormConfig