Units

Defines spacing and text sizes as multiples of a base unit for consistent UI design, simplifying layout scaling and customization with a default base of 16dp/16sp.

Android JVMJVMKotlin/NativeWasmJS
GitHub stars1
Open issues0
LicenseMIT License
Creation dateabout 2 years ago

Last activityover 1 year ago
Latest release2.0.3 (over 1 year ago)

Units

A helper library for defining spacing and textsizes as a multiple of some base unit (default 16dp/16sp).

Build Lint

Installation

Stable Preview

implementation "cl.emilym.compose:units:<latest>"

Usage

CompositionLocalProvider(
    LocalBaseDp provides 8.dp
) {
    // Box is sized to 16dp by 16dp
    Box(Modifier.size(2.rdp))
}
Android JVMJVMKotlin/NativeWasmJS
GitHub stars1
Open issues0
LicenseMIT License
Creation dateabout 2 years ago

Last activityover 1 year ago
Latest release2.0.3 (over 1 year ago)

Units

A helper library for defining spacing and textsizes as a multiple of some base unit (default 16dp/16sp).

Build Lint

Installation

Stable Preview

implementation "cl.emilym.compose:units:<latest>"

Usage

CompositionLocalProvider(
    LocalBaseDp provides 8.dp
) {
    // Box is sized to 16dp by 16dp
    Box(Modifier.size(2.rdp))
}