A specialized button component designed for language selection, featuring flag display and animated selection state.

Installation

npm install expo-image @expo/vector-icons react-native-reanimated

Import

import LanguageButton from '@/components/common/buttons/language-button';

Props

PropTypeRequiredDefaultDescription
item{ code: string; name: string; flag: string; }Yes-Language item data
isActivebooleanYes-Selection state
onPress() => voidYes-Selection handler

Examples

function Example() {
  return (
    <LanguageButton
      item={{
        code: 'en',
        name: 'English',
        flag: 'GB'
      }}
      isActive={true}
      onPress={() => console.log('Selected')}
    />
  );
}