Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
interface ComposeField
Optional Compose view owned by a styled or custom field.
Link copied to clipboard
Link copied to clipboard
object FieldColorsToken
Link copied to clipboard
object FieldDefaults
Link copied to clipboard
data class KotoseFormStyle(val accent: Color, val text: Color, val placeholder: Color, val inputBackground: Color, val inputBorder: Color, val focusedBorder: Color, val disabledText: Color, val disabledBackground: Color, val error: Color, val warning: Color, val paragraphBackground: Color, val cornerRadius: Dp, val borderWidth: Dp, val inputTextStyle: TextStyle, val messageTextStyle: TextStyle, val titleTextStyle: TextStyle, val showsMessageIcons: Boolean, val showsKeyboardBar: Boolean = true)
Visual tokens for the Compose renderer, named like the SwiftUI KotoseFormStyle so one brand maps to both renderers. Kotlin owns every semantic (enabled, error, warning, focus, labels); the style only decides how the renderer draws them. Defaults come from MaterialTheme, so a form inside the app's theme already follows it; use KotoseFormTheme to override tokens.
Functions
Link copied to clipboard
fun animateBorderStrokeAsState(enabled: Boolean, isError: Boolean, interactionSource: InteractionSource, colors: FieldColors, focusedBorderThickness: Dp = FocusedBorderThickness, unfocusedBorderThickness: Dp = UnfocusedBorderThickness): State<BorderStroke>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun FormScreen(modifier: Modifier = Modifier, lazyListState: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, hideKeyboardOnDrag: Boolean = true, onFormEvent: (SealedFormEvents) -> Unit? = null, form: Form = LocalForm.current, fieldView: @Composable (field: Field<*>) -> Unit = { field ->
DefaultFieldView(field)
})
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The style in effect: the override from KotoseFormTheme, or the current Material look.
Link copied to clipboard
Applies style to every form renderer below it.
Link copied to clipboard
fun LabelCheckBox(selected: Boolean, onClick: () -> Unit, label: String, modifier: Modifier = Modifier, colors: FieldColors = FieldDefaults.fieldColors(), textStyle: TextStyle = LocalTextStyle.current, enabled: Boolean = true, subtitle: String? = null)
Link copied to clipboard
fun LabelRadioButton(selected: Boolean, onClick: () -> Unit, label: String, modifier: Modifier = Modifier, colors: FieldColors = FieldDefaults.fieldColors(), textStyle: TextStyle = LocalTextStyle.current, enabled: Boolean = true, subtitle: String? = null)
Link copied to clipboard
Formats the national number as it is typed; without a PhoneNumberBackend it shows the digits.
Link copied to clipboard