npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azir-input

v1.0.7

Published

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

Downloads

65

Readme

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"  />

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>

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>

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>

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>

Props


Reference

type

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

| Type | Required | Default | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | | 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') | No | default |

endIcon

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

| Type | Required | Default | | ------------------- | -------- | ------- | | string, JSX element | No | Not Set |

endIconSize

Set the end Icon Size of the input Text.

| Type | Required | Default | | ------ | -------- | ------- | | number | No | Not Set |

endIconColor

Set the end Icon Color of the input Text.

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | theme |

startIcon

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

| Type | Required | Default | | ------------------- | -------- | ------- | | string, JSX element | No | Not Set |

startIconSize

Set the start Icon Size of the input Text.

| Type | Required | Default | | ------ | -------- | ------- | | number | No | Not Set |

startIconColor

Set the start Icon Color of the input Text.

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | theme |

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)

| Type | Required | Default | | ---- | -------- | ------- | | bool | No | false |

disabled

If true, disable all interactions for this component.

| Type | Required | Default | | ---- | -------- | ------- | | bool | No | false |

borderless

Sets the Input's borderWidth to 0

| Type | Required | Default | | ---- | -------- | ------- | | bool | No | false |

rounded

Sets the corners to be rounded

| Type | Required | Default | | ---- | -------- | ------- | | bool | No | false |

renderPasswordIcon

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

| Type | Required | Default | | -------------------- | -------- | ------- | | Render Prop Function | No | null |

placeholderTextColor

Sets the placeholder's text color

| Type | Required | Default | | ------------------------------------------ | -------- | --------------------- | | azir-color | No | AzirTheme.COLORS.GREY |

color

Input Text color

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | black |

selectionColor

Input Text cursor color

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | theme |

bgColor

Input background color

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | Not set |

label

Sets the label of the input

| Type | Required | Default | | ------------------- | -------- | ------- | | string, JSX element | No | Not Set |

labelPosition

Sets the label Position

| Type | Required | Default | | ------------------------ | -------- | ------- | | "top" , "left" , "right" | No | top |

labelStyle

override Label Style

| Type | Required | | ----- | -------- | | style | No |

help

Sets the help of the input

| Type | Required | Default | | ------------------- | -------- | ------- | | string, JSX element | No | Not Set |

helpPosition

Sets the help Position

| Type | Required | Default | | ---------------- | -------- | ------- | | "top" , "bottom" | No | bottom |

helpStyle

override help Style

| Type | Required | | ----- | -------- | | style | No |

containerStyle

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

| Type | Required | | ----- | -------- | | style | No |