🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-language-select

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-language-select

Useful and customizable language picker

1.1.1
latest
Source
npm
Version published
Weekly downloads
12
-7.69%
Maintainers
1
Weekly downloads
 
Created
Source
React Native Typescript Library Starter

React Native Typescript Library Starter

Installation

Add the dependency:

npm i react-native-language-select

Import

import LanguagePicker, { ILanguagePicker } from "react-native-language-select";

Example Data

const data: ILanguagePicker[] = [
  {
    title: "English",
    imageSource: require("./lib/local-assets/america.png"),
    language: "en",
  },
  {
    title: "Italian",
    imageSource: require("./lib/local-assets/italy.png"),
  },
  {
    title: "German",
    imageSource: require("./lib/local-assets/germany.png"),
  },
  {
    title: "Turkish",
    imageSource: require("./lib/local-assets/turkey.png"),
    language: "tr-TR",
  },
  {
    title: "Swedish",
    imageSource: require("./lib/local-assets/sweden.png"),
  },
  {
    title: "Japanese",
    imageSource: require("./lib/local-assets/japan.png"),
  },
];

Usage

<LanguagePicker
  initialIndex={1}
  data={data}
  onSelect={(selectedItem: ILanguagePicker) => {
    onsole.log(selectedItem);
  }}
/>

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
dataILanguagePickerundefinedLanguage select data
onSelectfunctionundefinedselect the language item when it is pressed

Customization (Optionals)

PropertyTypeDefaultDescription
flatListStylestyledefaultset or override the style object for the main container
containerWidthwindowWidth * 0.9numberset the main container width
containerHeightwindowHeight * 0.7numberset the main container height
initialIndexnumberundefinedset your selected language item
widthwindowWidth * 0.9numberset the language item width
height80numberset the language item height
backgroundColor'#FFFFFF'stringset the language item background color
activeBorderColor'#504ED9'stringsset the language item active item border color
textColor'#2F3452'stringset to language text
itemContainerdefaultdefaultchange the language item container style
imageComponentdefaultReact.ReactNode / React.ReactNode[]change the language image component
checkComponentdefaultReact.ReactNode / React.ReactNode[]change the check component
languageItemPropsdefaultILanguageItemPropschange the language item props

Future Plans

  • LICENSE

Inspiration

Thank you Oww Studio )

Author

Sevval Eygul, sevvalleygull@gmail.com

License

React Native Language Select is available under the MIT license. See the LICENSE file for more info.

Keywords

Sevval Eygul

FAQs

Package last updated on 03 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts