CCPConfig

data class CCPConfig(val phoneInputCornerRadius: Dp, val phoneHintStyle: TextStyle, val borderWidth: Dp, val autoDetectCountry: Boolean, val showHeader: Boolean, val showCountryFlag: Boolean, val countriesSheetShape: Shape, val searchBorderWidth: Dp, val searchCornerRadius: Dp, val searchHintStyle: TextStyle, val headerStyle: TextStyle, val showDialCodeCountryItem: Boolean, val showFlagCountryItem: Boolean, val countryItemDialCodeTextStyle: TextStyle, val countryItemNameTextStyle: TextStyle, val countryItemShape: Shape, val phoneInputShape: Shape, val showCountriesHeaderDivider: Boolean, val readOnly: Boolean, val showClearButton: Boolean, val enforceMaxLength: Boolean, val defaultCountryListStyle: CountryListStyle, val countryPickerStyle: CountryPickerStyle, val showLabel: Boolean, val showPhonePrefixDivider: Boolean, val phoneFieldSize: PhoneFieldSize)(source)

Configuration options for customizing the appearance and behavior of the CCP component.

Constructors

Link copied to clipboard
constructor(phoneInputCornerRadius: Dp, phoneHintStyle: TextStyle, borderWidth: Dp, autoDetectCountry: Boolean, showHeader: Boolean, showCountryFlag: Boolean, countriesSheetShape: Shape, searchBorderWidth: Dp, searchCornerRadius: Dp, searchHintStyle: TextStyle, headerStyle: TextStyle, showDialCodeCountryItem: Boolean, showFlagCountryItem: Boolean, countryItemDialCodeTextStyle: TextStyle, countryItemNameTextStyle: TextStyle, countryItemShape: Shape, phoneInputShape: Shape, showCountriesHeaderDivider: Boolean, readOnly: Boolean, showClearButton: Boolean, enforceMaxLength: Boolean, defaultCountryListStyle: CountryListStyle, countryPickerStyle: CountryPickerStyle, showLabel: Boolean, showPhonePrefixDivider: Boolean, phoneFieldSize: PhoneFieldSize)

Properties

Link copied to clipboard

Automatically detect the user's country via SIM, network, or locale.

Link copied to clipboard

Thickness of the border around the phone number input field.

Link copied to clipboard

Shape of the country selection bottom sheet.

Link copied to clipboard

TextStyle for the dial code in each country item.

Link copied to clipboard

TextStyle for the country name in each country item.

Link copied to clipboard

Shape of individual country list items.

Link copied to clipboard

How to present the country picker — CountryPickerStyle.BottomSheet (default, full-screen modal) or CountryPickerStyle.Dropdown (compact inline dropdown).

Link copied to clipboard

Initial layout of the country list — CountryListStyle.List or CountryListStyle.Grid. The user can toggle this at runtime via the sort button.

Link copied to clipboard

Cap input at the maximum digit count for the selected country.

Link copied to clipboard

TextStyle for the letter headers in the country list.

Link copied to clipboard

Overall size of the phone field — see PhoneFieldSize. PhoneFieldSize.Regular (the default) is unchanged from before this became configurable; PhoneFieldSize.Compact/PhoneFieldSize.ExtraCompact shrink the field's height by scaling its padding, flag, chevron, icon-button, and font sizes down together, so a shorter field never clips or crowds its own content. Only affects the CountryPickerStyle.BottomSheet rendering.

Link copied to clipboard

TextStyle for the placeholder text inside the phone input.

Link copied to clipboard

Corner radius of the phone input field container.

Link copied to clipboard

Shape of the phone input field container.

Link copied to clipboard

Make the phone input non-editable and the country selector non-tappable.

Link copied to clipboard

Border thickness of the search field inside the sheet.

Link copied to clipboard

Corner radius of the search field.

Link copied to clipboard

TextStyle for the search field placeholder.

Link copied to clipboard

Show an × button inside the field to clear the entered number.

Link copied to clipboard

Show a divider line next to the letter header.

Link copied to clipboard

Display the country flag inside the phone input field.

Link copied to clipboard

Show the dial code (e.g. +1) inside each country list item.

Link copied to clipboard

Show the flag emoji inside each country list item.

Link copied to clipboard

Display a letter header inside the country selection sheet.

Link copied to clipboard

Show a floating label above the phone field, notched into its outline — see com.ezzy.ccp.components.PhoneNumberInput's label parameter for the label text. Only affects the CountryPickerStyle.BottomSheet rendering.

Link copied to clipboard

Show the thin vertical divider between the country prefix (flag, dial code, chevron) and the number editor inside the phone field. Only affects the CountryPickerStyle.BottomSheet rendering.