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-searchbar

v1.0.0

Published

Animated search bar for react-native apps

Downloads

8

Readme

React Native Animated Searchbar for easy usage

:star: Screenshot

:arrow_down: Installation


$ yarn add react-native-animated-searchbar

or

$ npm install --save react-native-animated-searchbar

:flashlight: Example Usage

import React from 'react';
import { View, StyleSheet, Text } from 'react-native';
import Fontawesome from 'react-native-vector-icons/FontAwesome';
import Feather from 'react-native-vector-icons/Feather';
import AnimatedSearchbar from 'react-native-animated-searchbar';
import { SearchScreen } from './SearchScreen'
Fontawesome.loadFont();
Feather.loadFont();





export const Example = () => {

    const HeaderRight = <View style={styles.rightSide}>
        <Feather name={"message-circle"} size={24} color={"#d32f2f"} />
    </View>

    const SearchBarIcon = <View style={styles.baricon}>
        <Fontawesome name={"search"} size={18} color={"gray"} />
    </View>



    return (
        <AnimatedSearchbar
            headerRight={HeaderRight}
            searchBarIcon={SearchBarIcon}
            searchScreen={<SearchScreen />}
            onChangeText={(text) => console.log(text)}
            title={"Contacts"}
        >
            <View style={styles.mainView}>
                <Text style={styles.text}>Main Screen</Text>
                {/* Your screen */}
            </View>
        </AnimatedSearchbar>
    );
}

const styles = StyleSheet.create({
    rightSide: {
        flex: 1,
        alignSelf: 'stretch',
        flexDirection: 'row',
        justifyContent: 'flex-end',
        alignItems: 'center',
        marginRight: 20
    },
    baricon: {
        alignSelf: 'stretch',
        justifyContent: 'center',
        marginLeft: 10
    },
    mainView: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'purple'
    },
    searchScreen: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'green'
    },
    text: {
        fontSize: 28,
        color: "white"
    }
})

:paperclip: Config

| Params | Type | Default | Required | Description | | --- | --- | --- | --- | --- | | backgroundColor | string | #191919 | NO | Background color of the hader | | animationDuration | number | 150 | NO | Component animation duration |
| headerRight | Component | - | NO | Right side of the header. You can put your custom component. | | headerLeft | Component | - | NO | Left side of the header. You can put your custom component. | | title | string | Title | No | Title text of the component | | cancelText | string | Cancel | NO | Cancel text of the searchbar | | cancelTextStyle | StyleSheet | - | NO | Styles of the cancel text | | cancelTextMarginRight | number | 20 | NO | Margin right of the cancel text | | placeholder | string | Search... | NO | Placeholder of the search bar | | searchbarStyle | StyleSheet | - | NO | Style of the search bar | | placeholderTextColor | string | gray | NO | Placeholder color of the searchbar | | onPressCancel | func | - | NO | Run on press cancel text | | onFocus | func | - | NO | Run on focus search bar | | onChangeText | func | - | NO | Run on change text | | headerHeight | number | 50 | NO | Header height without searchbar | | searchBarIcon | Component | -| NO | Searchbar icon | | searchScreen | Component | - | NO | Second screen for search. Open on focus search bar |