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-interactive-button

v1.2.0

Published

A highly customizable and interactive button component for React Native applications

Downloads

72

Readme

React Native Customizable Button

npm version npm downloads Coverage Status code style: prettier

A flexible and feature-rich button component for React Native applications, offering a variety of customization options including icons, subtitles, loading state, and more.

Demo

Android

android_record gif

iOS

ios_record gif

Features

  • Customizable Styles: Modify colors, sizes, padding, border radius, and more.
  • Loading State: Show a loading spinner when the button is in a loading state.
  • Animation on Press: Scale down animation on button press, enhancing user interaction.
  • Icon Support: Include icons within your button, with options for left or right positioning.
  • Customizable Icon Color: Change the color of icons as per your design needs.
  • Subtitle Option: Add a subtitle for additional context or information.
  • Customizable Title and Subtitle Colors: Set specific colors for title and subtitle text.
  • Shadow Effect: Optional shadow for a more distinguished look.
  • Ripple Effect: On Android, a ripple effect is provided for touch feedback.
  • Accessibility Features: Improve accessibility with labels and hints.

Installation

To add the Customizable Button to your React Native project, run:

npm install react-native-interactive-button
# or
yarn add react-native-interactive-button

Usage

Import the Button component and use it in your project:

import React from 'react';
import Button from 'react-native-interactive-button';
import Icon from 'react-native-vector-icons/FontAwesome'; // If using icons

const App = () => {
  return (
    <Button
        title="Press Me"
        subtitle="More Info"
        titleColor="white"
        subtitleColor="gray"
        onPress={() => console.log('Pressed')}
        style={{backgroundColor: 'black'}}
        loading={false}
        disabled={false}
        iconName="rocket"
        iconComponent={Icon}
        iconColor="white"
        iconRight={false}
        shadow={true}
    />
  );
};

export default App;

Props

  • title (string): Main text displayed on the button.
  • subtitle (string): Additional text displayed below the title.
  • titleColor (string): Color of the title text.
  • subtitleColor (string): Color of the subtitle text.
  • onPress (function): Function to execute on button press.
  • style (object): Custom styles to apply to the button.
  • loading (bool): If true, shows a loading spinner.
  • disabled (bool): If true, disables button interactions.
  • iconName (string): Name of the icon (if using icons).
  • iconComponent (elementType): The icon component (e.g., from react-native-vector-icons).
  • iconColor (string): Color of the icon.
  • shadow (bool): Enables shadow effect.
  • borderColor (string): Color of the button's border.
  • iconRight (bool): If true, places the icon to the right side.

License

Licensed under the MIT License.