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-animated-input

v1.1.0

Published

A lightweight and easy to use floating animated input! :)

Downloads

302

Readme

React Native Animated Input

Do you need a beautiful, lightweight and customizable Animated Floating Input? Here it is!

A cross-platform Animated Floating Input component with style options and smooth animation.

  • Checkout the example/ folder for use example.

Features

  • OnFocus and OnDismiss animations
  • Custom style for every little bit of it
  • Smooth animations
  • Very lightweight

Installation

Open a Terminal in the project root and run:

npm install react-native-animated-input

Quick Start

import React from "react";
import { View } from "react-native";
import AnimatedInput from "react-native-animated-input";

const App = () => {
  return (
    <View style={{ flex: 1, justifyContent: "center", paddingHorizontal: 20 }}>
      <AnimatedInput
        placeholder="Email"
        valid={isValid}
        errorText="Error"
        onChangeText={handleChange}
        value={email}
        styleLabel={{ fontWeight: "600" }}
        styleBodyContent={{ borderBottomWidth: 1.5 }}
      />
    </View>
  );
};
export default App;

Props

valid - boolean (Default - true)

Shows or hides the error text and color.

errorText - string (Default - none)

Sets the error text to be displayed.

errorColor - string (Default - red)

Sets the color of the error highlight.

placeholder - string (Default - none) REQUIRED

Defines the placeholder text to be shown and animated when onFocus.

disabled - boolean (Default - false)

Lock or unlock text input.

value - string (Default - none) - Works exactly as TextInput/ component

Defines the value of the input.

onChangeText - function (Default - none) Works exactly as TextInput/ component

Callback function that will handle the text input.

prefix - component (Default - none)

Renders the component on the beginning of the input. i.e R$ -> R$ 200,00.

sufix - component (Default - none)

Renders the component on the end of the input. i.e Kg -> 200Kg.

others - props (Default - none)

Any other prop of the TextInput/ component can be used and will work properly.

Style Props

styleContent - obj {}

Customizes the component main View.

styleInput - obj {}

Customizes the TextInput component.

styleError - obj {}

Customizes the error to be shown.

styleLabel - obj {}

Customizes the label/placeholder of the input.

styleBodyContent - obj {}

Customizes the view that manage the component composition - sufix, prefix, animated. Be careful.

labelInitialSize - obj {}

Defines the fontSize of the label on it's initial State (inactive)

labelFinalSize - obj {}

Defines the fontSize of the label on it's Final State (active)

textInputFontSize - obj {}

Defines the fontSize of the text input (active)

A huge thanks to my friend Laurent Lorena who made this possible! <3