Skip to main content

Theming & Styles

The component exposes two style objects: one for the input itself, and one for the country-selection modal.

phoneInputStyles

Source: lib/interfaces/phoneInputStyles.ts

PropertyTypeDescription
containerViewStyleMain input container
flagContainerViewStyleFlag and dropdown container
flagTextStyleFlag emoji styling
caretTextStyleDropdown arrow
dividerViewStyleSeparator line
callingCodeTextStyleCountry calling code
inputTextStylePhone number input

modalStyles

Source: rn-country-select countrySelectStyles

PropertyTypeDescription
backdropViewStyleModal background overlay
containerViewStyleModal main container
contentViewStyleModal content area
dragHandleContainerViewStyleDrag handle area
dragHandleIndicatorViewStyleDrag handle indicator
searchContainerViewStyleSearch input wrapper
searchInputTextStyleSearch input field
listViewStyleCountries list container
countryItemViewStyleIndividual country row
flagTextStyleCountry flag in list
countryInfoViewStyleCountry details container
callingCodeTextStyleCalling code in list
countryNameTextStyleCountry name in list
sectionTitleTextStyleSection headers
closeButtonViewStyleClose button container
closeButtonTextTextStyleClose button text
countryNotFoundContainerViewStyleNo results container
countryNotFoundMessageTextStyleNo results message
alphabetContainerViewStyleAlphabet filter container
alphabetLetterViewStyleAlphabet letter item
alphabetLetterTextTextStyleAlphabet letter text
alphabetLetterActiveViewStyleActive letter state
alphabetLetterDisabledViewStyleDisabled letter state
alphabetLetterTextActiveTextStyleActive letter text
alphabetLetterTextDisabledTextStyleDisabled letter text

Example

<PhoneInput
phoneInputStyles={{
container: {backgroundColor: '#1f2937', borderRadius: 12},
input: {color: '#fff'},
callingCode: {color: '#fff'},
caret: {color: '#9ca3af'},
}}
modalStyles={{
backdrop: {backgroundColor: 'rgba(0,0,0,0.7)'},
content: {backgroundColor: '#111827'},
countryName: {color: '#fff'},
callingCode: {color: '#9ca3af'},
}}
/>