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

react-native-text-input-material-swift-ui

v1.0.3

Published

A TextInput component customized to appear in material design on android e swift ui in ios

Downloads

4

Readme

react-native-text-input-material-swift-ui

A TextInput component customized to appear in material design on android e swift ui in ios

Installation

npm install react-native-text-input-material-swift-ui

Usage

Container

Creates a container for the screen and it will adapt the background color to the OS

import  *  as  React  from  'react'
   import { Container} from  "react-native-text-input-material-swift-ui"

   export  default () => {
    return (
	    <Container>
		    {/* Content of the form screen goes here */}
	    </Container>
	)
}

Props

| Key | Type | Desctriprion | Example | |-|-|-|-| | isDarkMode | boolean | if true the container uses the dark color scheme | isDarkMode={true} | | style | StyleSheetPropType | allow to add styles to the ScrollView component | style={{paddingVertical: 35}} |

TextInput

This componet is a standard React Native text input that will have different styles applied dipending on the OS: on an android device it will obey the matirial design guidelines and in ios it will obay the Swift UI guidelines.

import  *  as  React  from  'react'
import TextInput, { Container } from  "react-native-text-input-material-swift-ui"

export  default () => {
	// State
	const [nome, setNome] = React.useState('');
	
	return (
	    <Container>
		    <TextInput
				onChangeText={name => setName(name)}
				label='Name'
				defaultValue={name}
			/>
			{/* Other input components */}
	    </Container>
	)
}

Props

| Key | Type | Desctriprion | Example | |-|-|-|-| | isDarkMode | boolean | If true the container uses the dark color scheme | isDarkMode={true} | | label | string | Create a float label on android and an input placeholed in ios | label='Name' | | tintColor | color | The color of the floating android label | tintColor='red' | | fontFamily | string | The font of placeholder and label |fontFamily='open-sans-regular' | isFirst | boolean | If true provide the top border on the iOS input | isFirst={true} | | isLast | boolean | If true provide the bottom border on the iOS input | isLast={tue} | | stylesContainer | StyleSheetPropType | allow to add styles to the container View component on Android | style={{paddingBottom: 10}} | | stylesLabel | StyleSheetPropType | allow to add styles to the label component on Android | style={{left: 10}} | | style | StyleSheetPropType | allow to add styles to the textInput component | style={{left: paddingBottom: 20}} | it also accept all the React Native TextInput props

InputGroupLabel

This is a label that can be used to divide groups of input. This will also fallow OS design guidelines.

import  *  as  React  from  'react'
import TextInput, { Container, InputGroupLabel } from  "react-native-text-input-material-swift-ui"

export  default () => {
	// State
	const [nome, setNome] = React.useState('');
	const [email, setEmail] = React.useState('');
	
	return (
	    <Container>
		    <InputGroupLabel isTop>
			    User information
			</InputGroupLabel>
		    <TextInput
				onChangeText={name => setName(name)}
				label='Name'
				defaultValue={name}
			/>
			<TextInput
				onChangeText={email => setEmail(email)}
				label='E-mail'
				defaultValue={email}
			/>
			{/* Other input groups */}
	    </Container>
	)
}

Props

| Key | Type | Desctriprion | Example | |-|-|-|-| | isDarkMode | boolean | If true the container uses the dark color scheme | isDarkMode={true} | | fontFamily | string | The font of placeholder and label |fontFamily='open-sans-regular' | | isTop | boolean | if true set the top margin to 0 |fontFamily='open-sans-regular' | | style | StyleSheetPropType | allow to add styles to the label component | style={{left: paddingBottom: 20}} |