Package-level declarations
Functions
Link copied to clipboard
fun KAspectRatio(modifier: Modifier = Modifier, ratio: Float = 1.0f, content: @Composable () -> Unit)
Constrains its content to a given aspect ratio — mirrors shadcn/ui AspectRatio.
Link copied to clipboard
fun KInput(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, placeholder: String = "", enabled: Boolean = true, isPassword: Boolean = false, isError: Boolean = false, singleLine: Boolean = true, maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE, minLines: Int = 1, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(
keyboardType = if (isPassword) KeyboardType.Password else KeyboardType.Text
), keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Shadcn/ui-style Input — mirrors input.tsx.
Link copied to clipboard
fun KLabel(text: String, modifier: Modifier = Modifier, disabled: Boolean = false, style: TextStyle = MaterialTheme.typography.labelLarge.copy(
fontSize = 14.sp,
fontWeight = FontWeight.Medium,
lineHeight = 20.sp,
letterSpacing = 0.1.sp
), color: Color = if (disabled)
MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f)
else
MaterialTheme.colorScheme.onBackground)
Shadcn/ui-style Label — mirrors label.tsx.
Link copied to clipboard
Shadcn/ui-style Skeleton — mirrors skeleton.tsx.
Link copied to clipboard
fun KTextarea(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, placeholder: String = "", enabled: Boolean = true, isError: Boolean = false, minLines: Int = 2, maxLines: Int = Int.MAX_VALUE, keyboardOptions: KeyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
imeAction = ImeAction.Default
), keyboardActions: KeyboardActions = KeyboardActions.Default)
Shadcn/ui-style Textarea — mirrors textarea.tsx.