Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class DatePickerConstraints(val minDate: LocalDate? = null, val maxDate: LocalDate? = null)

Date constraints applied by DatePickerItems.

Link copied to clipboard
Link copied to clipboard
data class DatePickerItems(val yearItems: List<Int>, val monthItems: List<Int>, val dayItems: List<Int>, val constraints: DatePickerConstraints = DatePickerConstraints())
Link copied to clipboard
data class DatePickerLayout(val yearWeight: Float?, val monthWeight: Float?, val dayWeight: Float?, val columnOrder: ImmutableList<DatePickerColumn> = persistentListOf( DatePickerColumn.YEAR, DatePickerColumn.MONTH, DatePickerColumn.DAY ))

Represents layout options used by io.github.kezlab.compose.pickers.date.DatePicker columns.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class DurationPickerConstraints(val minDuration: Duration? = null, val maxDuration: Duration? = null)

Inclusive scalar bounds applied by DurationPickerItems.

Link copied to clipboard
data class DurationPickerItems(val hourItems: List<Int>, val minuteItems: List<Int>, val constraints: DurationPickerConstraints = DurationPickerConstraints())
Link copied to clipboard
data class DurationPickerLayout(val hourWeight: Float?, val minuteWeight: Float?, val columnOrder: ImmutableList<DurationPickerColumn> = persistentListOf( DurationPickerColumn.HOUR, DurationPickerColumn.MINUTE ))
Link copied to clipboard
Link copied to clipboard
data class PickerColors(val dividerColor: Color, val selectedItemBackgroundColor: Color, val textColor: Color, val selectedTextColor: Color, val disabledDividerColor: Color = dividerColor.copy(alpha = dividerColor.alpha * DISABLED_CONTAINER_ALPHA), val disabledSelectedItemBackgroundColor: Color = selectedItemBackgroundColor.copy( alpha = selectedItemBackgroundColor.alpha * DISABLED_CONTAINER_ALPHA ), val disabledTextColor: Color = textColor.copy(alpha = textColor.alpha * DISABLED_CONTENT_ALPHA), val disabledSelectedTextColor: Color = selectedTextColor.copy( alpha = selectedTextColor.alpha * DISABLED_CONTENT_ALPHA ))

Represents the colors used by Picker and related components.

Link copied to clipboard

Contains default values and factory methods for creating Picker styles. Follows Material3 component design patterns.

Link copied to clipboard
sealed interface PickerDividerWidth

Describes how wide the selection dividers of a Picker should be rendered.

Link copied to clipboard
data class PickerItemFormat<T : Any>(val itemText: (T) -> String = { it.toString() }, val itemContentDescription: (T) -> String? = null)

Value formatting for one Picker column.

Link copied to clipboard

Information passed to custom Picker item content.

Link copied to clipboard
data class PickerSelectionIndicator(val color: Color, val thickness: Dp, val shape: Shape, val horizontalInset: Dp, val isVisible: Boolean, val disabledColor: Color = color.copy(alpha = color.alpha * DISABLED_CONTAINER_ALPHA))

Describes the single selection band drawn by composite pickers (e.g. io.github.kezlab.compose.pickers.time.TimePicker, io.github.kezlab.compose.pickers.date.DatePicker).

Link copied to clipboard
data class PickerSemantics(val pickerLabel: String? = null, val previousItemActionLabel: String? = PickerDefaults.PreviousItemActionLabel, val nextItemActionLabel: String? = PickerDefaults.NextItemActionLabel)

Semantics configuration for one Picker column.

Link copied to clipboard
data class PickerStyle(val visibleItemsCount: Int, val colors: PickerColors, val textStyles: PickerTextStyles, val selectedItemBackgroundShape: Shape, val itemPadding: PaddingValues, val fadingEdgeGradient: Brush, val horizontalAlignment: Alignment.Horizontal, val dividerThickness: Dp, val dividerShape: Shape, val dividerWidth: PickerDividerWidth, val isDividerVisible: Boolean)

Represents visual and layout styling shared by Picker and related components.

Link copied to clipboard
data class PickerTextStyles(val textStyle: TextStyle, val selectedTextStyle: TextStyle)

Represents the text styles used by Picker and related components.

Link copied to clipboard
Link copied to clipboard
data class TimePickerConstraints(val minTime: LocalTime? = null, val maxTime: LocalTime? = null)

Time constraints applied by TimePickerItems.

Link copied to clipboard
Link copied to clipboard
data class TimePickerItems(val minuteItems: List<Int>, val hour24Items: List<Int>, val hour12Items: List<Int>, val periodItems: List<TimePeriod>, val constraints: TimePickerConstraints = TimePickerConstraints())
Link copied to clipboard
data class TimePickerLayout(val periodWeight: Float?, val hourWeight: Float?, val minuteWeight: Float?, val columnOrder: ImmutableList<TimePickerColumn> = persistentListOf( TimePickerColumn.PERIOD, TimePickerColumn.HOUR, TimePickerColumn.MINUTE ))

Represents layout options used by io.github.kezlab.compose.pickers.time.TimePicker columns.

Link copied to clipboard
data class TimePickerSemantics(val hour: PickerSemantics, val minute: PickerSemantics, val period: PickerSemantics)
Link copied to clipboard
Link copied to clipboard
data class YearMonthPickerConstraints(val minYearMonth: YearMonth? = null, val maxYearMonth: YearMonth? = null)

Year/month constraints applied by YearMonthPickerItems.

Link copied to clipboard
data class YearMonthPickerItems(val yearItems: List<Int>, val monthItems: List<Int>, val constraints: YearMonthPickerConstraints = YearMonthPickerConstraints())
Link copied to clipboard
data class YearMonthPickerLayout(val yearWeight: Float?, val monthWeight: Float?, val columnOrder: ImmutableList<YearMonthPickerColumn> = persistentListOf( YearMonthPickerColumn.YEAR, YearMonthPickerColumn.MONTH ))

Represents layout options used by io.github.kezlab.compose.pickers.date.YearMonthPicker columns.

Link copied to clipboard

Functions

Link copied to clipboard
fun currentDate(timeZone: TimeZone = TimeZone.currentSystemDefault()): LocalDate

Reads the current local date.

Link copied to clipboard
fun currentDateTime(timeZone: TimeZone = TimeZone.currentSystemDefault()): LocalDateTime

Reads the current local date and time.

Link copied to clipboard
fun <T : Any> WheelPicker(items: List<T>, selectedItem: T, onSelectedItemChange: (T) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, format: PickerItemFormat<T> = PickerDefaults.itemFormat(), style: PickerStyle = PickerDefaults.style(), semantics: PickerSemantics = PickerDefaults.semantics(), isInfinity: Boolean = true, onSelectionSettled: (T) -> Unit = {}, content: @Composable (PickerItemScope<T>) -> Unit? = null)

A controlled single-column wheel picker with separate live and settled selection callbacks.