Package-level declarations

Shared helper functions.

Types

Link copied to clipboard
data class A11ySkipListing(val listTitle: String, val actionLabel: String, val nextItemFocusRequester: FocusRequester)

Used to skip listing when a list of components is too large

Link copied to clipboard
data class AccessibleLabel(val text: String, val contentDescription: String?)

AccessibleLabel is used to provide a text label and an optional content description for accessibility purposes. This is useful when you want to provide additional context for screen readers or other assistive technologies.

Link copied to clipboard

Defines the border type.

Functions

Link copied to clipboard
fun DrawScope.animatedRoundedBackground(animatedScale: Animatable<Float, AnimationVector1D>, backgroundColor: Color, cornerRadius: Dp)
Link copied to clipboard
fun Modifier.focusableWithBorder(focused: State<Boolean>, enabled: Boolean = true, cornerSize: Dp = 0.dp, borderType: FocusBorderType = FocusBorderType.Default, insideBorder: Boolean = false, doubleBorders: Boolean = true): Modifier
fun Modifier.focusableWithBorder(focused: State<Boolean>, enabled: Boolean = true, shape: CornerBasedShape, borderType: FocusBorderType = FocusBorderType.Default, insideBorder: Boolean = false, doubleBorders: Boolean = true, paddingValues: PaddingValues = PaddingValues()): Modifier

InternalSkapaApi modifier extension used to apply Skapa keyboard navigation border to focusable components

Link copied to clipboard
fun Modifier.minimumTouchTargetSize(width: Dp = 48.dp, height: Dp = 48.dp): Modifier

InternalSkapaApi modifier extension copied from androidx.compose.material.TouchTarget used to guarantee minimum touch target size.

Link copied to clipboard
Link copied to clipboard

Forcing keyboard navigation FocusDirection.Next and FocusDirection.Previous when using Key.Tab in eg. multiline text fields/text areas. Used same solution as Kotlin multi-platform uses as workaround. https://github.com/JetBrains/compose-multiplatform/blob/master/tutorials/Tab_Navigation/README.md#a-possible-workaround

Link copied to clipboard
fun Modifier.pointerHoverHandIcon(hover: Boolean, enabled: Boolean = true): Modifier
Link copied to clipboard
fun rememberSkapaButtonIndication(resizeFactor: Float = SkapaAnimation.SizeFactors.RegularComponents, animationSpec: AnimationSpec<Float> = SkapaAnimation.PressAnimationSpec, color: Color? = null, cornersRadius: Dp = Dp.Unspecified, scale: Animatable<Float, AnimationVector1D>): Indication
Link copied to clipboard
fun Modifier.skapaShadow(cornersRadius: Dp, color: Color = Color.Unspecified, shadowBlurRadius: Dp = 16.dp, offsetY: Dp = 4.dp, offsetX: Dp = 0.dp): Modifier

InternalSkapaApi modifier extension used to apply Skapa default shadow.

Link copied to clipboard
fun <T> Modifier.thenCheckNull(nullable: T?, block: @Composable Modifier.(value: T) -> Modifier): Modifier

Applies the modifier provided if the nullable value is not null, uses Modifier.then() Example: Modifier.thenCheckNull("NotNull") { clickable(onClick = it) }

Link copied to clipboard

Applies the modifier provided if the @param boolean value is true, uses Modifier.then() Example: Modifier.thenCheckTrue("BooleanValue") { minimumTouchTargetSize() }