Socket
Socket
Sign inDemoInstall

azir-input

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    azir-input

An advance Input component that should render nicely on any platform. Supports a great level of customization.


Version published
Weekly downloads
8
decreased by-86.89%
Maintainers
1
Install size
126 kB
Created
Weekly downloads
 

Readme

Source

Azir Framwork : https://azir.io/docs

Input

An advance Input component that should render nicely on any platform. Supports a great level of customization.

for version 1.0.3 and above now you can use startIcon and EndIcon instead of Icon props.

Installation

to install the latest version of azir-input you only need to run:

npm install azir-input  --save

or

yarn add azir-input

Examples

Basic
import Input from "azir-input";
import {SolidIcons} from "azir-icon";
---
<Input help="error!!" label="Nice Input ;)" placeholder="Email"
endIcon={SolidIcons.boxOpen} endIconSize={60} endIconColor="error"  />
Basic
RTL with custom Icon
import Input from "azir-input";
import Icon, {SolidIcons} from "azir-icon";
import AzirTheme from "azir-theme";
---
<View style={ { width: "80%" } }>
<Input
    endIcon={<Icon icon={SolidIcons.at} size={22} color={AzirTheme.COLORS.SUCCESS} />}
    inputStyle={ { color: "green" } }
    help="خطأ !!"
    label="البريد الإلكتروني : "
    labelPosition="right"
    helpStyle={ { marginRight: 110 } }
/>
</View>
Basic
advance Themes => Theme 1
import Input from "azir-input";
import Icon, {SolidIcons} from "azir-icon";
---
<Input
    labelPosition="top"
    helpPosition="top"
    label="Password"
    labelStyle={ { color: "#fff", padding: 5 } }
    inputStyle={ { fontSize: 18, paddingHorizontal: 10, color: "#34495e" } }
    style={ { height: 55, paddingHorizontal: 0, backgroundColor: "#fff" } }
    containerStyle={ { backgroundColor: "#34495e" } }
    password
    renderPasswordIcon={password => {
    return <Icon style={ [ { backgroundColor: "#34495e", padding: 13 }, props.iconStyle] }
    icon={password ? SolidIcons.eye : SolidIcons.ellipsisHh} size={24} color="#ccc" />;
    } }
></Input>
Basic
advance Themes => Theme 2
import Input from "azir-input";
import Icon, {SolidIcons} from "azir-icon";
---
 <Input
    labelPosition="top"
    label="Email"
    helpPosition="top"
    labelStyle={ {  color: "#2196f3" } }
    inputStyle={ { fontSize: 18, paddingHorizontal: 10, color: "#2196f3" } }
    style={ {
    borderColor: "#2196f3",
    borderBottomWidth: 2,
    borderTopWidth: 0,
    borderLeftWidth: 0,
    borderRightWidth: 0,
    height: 55,
    paddingHorizontal: 0,
    backgroundColor: "transparent"
    } }
    endIcon={<Icon style={ { padding: 13 } } icon={SolidIcons.at} size={24} color={"#2196f3"}></Icon>}
></Input>
Basic
advance Themes => Theme 3
import Input from "azir-input";
import Icon, {SolidIcons} from "azir-icon";
---
<Input
    labelPosition="top"
    helpPosition="top"
    labelStyle={ { color: "#BFD2FF" } }
    inputStyle={ { fontSize: 18, paddingHorizontal: 10, color: "#BFD2FF" } }
    style={ {
    borderColor: "#59e3e6",
    borderBottomWidth: 3,
    borderTopWidth: 0,
    borderLeftWidth: 0,
    borderRightWidth: 0,
    height: 60,
    paddingHorizontal: 0,
    backgroundColor: "#363a4e"
    } }
    endIcon={<Icon style={ { padding: 13 } } icon={SolidIcons.arrowRight} size={24} color={"#BFD2FF"}>
    </Icon>}>
</Input>
Basic

Props


Reference

type

Determines which keyboard to open, e.g.numeric.

TypeRequiredDefault
enum('default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password')Nodefault

endIcon

Set the end Icon of the input Text, can be string or jsx element.

TypeRequiredDefault
string, JSX elementNoNot Set

endIconSize

Set the end Icon Size of the input Text.

TypeRequiredDefault
numberNoNot Set

endIconColor

Set the end Icon Color of the input Text.

TypeRequiredDefault
azir-colorNotheme

startIcon

Set the start Icon of the input Text, can be string or jsx element.

TypeRequiredDefault
string, JSX elementNoNot Set

startIconSize

Set the start Icon Size of the input Text.

TypeRequiredDefault
numberNoNot Set

startIconColor

Set the start Icon Color of the input Text.

TypeRequiredDefault
azir-colorNotheme

password

Tells the input that this is going to be a password input. ( it will show eye icon which you can press to toggle show pass or not)

TypeRequiredDefault
boolNofalse

disabled

If true, disable all interactions for this component.

TypeRequiredDefault
boolNofalse

borderless

Sets the Input's borderWidth to 0

TypeRequiredDefault
boolNofalse

rounded

Sets the corners to be rounded

TypeRequiredDefault
boolNofalse

renderPasswordIcon

Render Props Function you can override Input icon , we pass password boolean args

TypeRequiredDefault
Render Prop FunctionNonull

placeholderTextColor

Sets the placeholder's text color

TypeRequiredDefault
azir-colorNoAzirTheme.COLORS.GREY

color

Input Text color

TypeRequiredDefault
azir-colorNoblack

selectionColor

Input Text cursor color

TypeRequiredDefault
azir-colorNotheme

bgColor

Input background color

TypeRequiredDefault
azir-colorNoNot set

label

Sets the label of the input

TypeRequiredDefault
string, JSX elementNoNot Set

labelPosition

Sets the label Position

TypeRequiredDefault
"top" , "left" , "right"Notop

labelStyle

override Label Style

TypeRequired
styleNo

help

Sets the help of the input

TypeRequiredDefault
string, JSX elementNoNot Set

helpPosition

Sets the help Position

TypeRequiredDefault
"top" , "bottom"Nobottom

helpStyle

override help Style

TypeRequired
styleNo

containerStyle

override input container Style which include ( input text + icon)

TypeRequired
styleNo

Keywords

FAQs

Last updated on 19 Dec 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc