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-customize-check-box

v1.0.2

Published

A flexible and customizable checkbox component for React Native applications. This package provides an easy-to-use checkbox component that can be integrated into your React Native projects to enable users to select or deselect options.

Downloads

8

Readme

react-native-custom-check-box

A flexible and customizable checkbox component for React Native applications. This package provides an easy-to-use checkbox component that can be integrated into your React Native projects to enable users to select or deselect options.

The Checkbox component supports various customization options, including different sizes, colors, and styles. It also offers a selection of event handlers to handle checkbox state changes and provide feedback to users.

Whether you need checkboxes for forms, settings screens, or any other UI element requiring user input, this package simplifies the process of implementing checkboxes in your React Native application.

Features

  • Customizable checkbox styles, sizes, and colors.
  • Support for different states (checked, unchecked).
  • Callback functions for handling checkbox state changes.
  • Easy integration with React Native projects.

Installation

Install the package using npm:

npm install react-native-customize-check-box

Output

Output Example

Example1

Output Example

import { View, Text } from "react-native";
import React from "react";
import CheckBox from "react-native-customize-check-box";

const TestScript = () => {
  const [data, setData] = React.useState({
    car: false,
    bike: false,
    walk: false,
    scooter: true,
    taxi: false,
    bicycle: false,
  });
  return (
    <View
      style={{
        flex: 1,
        backgroundColor: "#36454F",
        padding: 12,
      }}
    >
      <View
        style={{
          marginTop: 14,
        }}
      >
        <Text
          style={{
            color: "#fff",
            fontSize: 22,
            fontWeight: "800",
            marginBottom: 24,
            textTransform: "capitalize",
          }}
        >
          Simple check boxes
        </Text>
        {Object.keys(data).map((key) => {
          return (
            <CheckBox
              key={key}
              isChecked={data[key]}
              label={key.toString()}
              onClick={() => setData({ ...data, [key]: !data[key] })}
            />
          );
        })}
      </View>
    </View>
  );
};

export default TestScript;

Example2

Output Example

import { View, Text } from "react-native";
import React from "react";
import CheckBox from "react-native-customize-check-box";

const TestScript = () => {
  const [data, setData] = React.useState({
    car: false,
    bike: false,
    walk: false,
    scooter: true,
    taxi: false,
    bicycle: false,
  });
  return (
    <View
      style={{
        flex: 1,
        backgroundColor: "#36454F",
        padding: 12,
      }}
    >
      <View
        style={{
          marginTop: 14,
        }}
      >
        <Text
          style={{
            color: "#fff",
            fontSize: 22,
            fontWeight: "800",
            marginBottom: 24,
            textTransform: "capitalize",
          }}
        >
          check boxes with available props
        </Text>
        {Object.keys(data).map((key) => {
          return (
            <CheckBox
              key={key}
              isChecked={data[key]}
              label={key.toString()}
              labelStyle={{ fontWeight: "600" }}
              checkedCheckBoxColor={"#fc8803"}
              checkedIconColor="blue"
              checkboxContainerStyle={{
                borderRadius: 20,
                height: 40,
                width: 40,
              }}
              checkedIconStyle={{ width: 25, height: 25 }}
              uncheckedCheckBoxColor={"red"}
              onClick={() => setData({ ...data, [key]: !data[key] })}
            />
          );
        })}
      </View>
    </View>
  );
};

export default TestScript;

| Prop name | default | type | Description | |:------------------------:|---------|------------|------------------------------------------------------------------------------------------------------| | isChecked | false | bool | checkbox check state | | label | null | String | give your checkbox label. | | labelStyle | | Object | style your checkbox label text. | | checkedIconColor | white | String | change the check icon color | | checkedIconStyle | | Object | style your checked icon as per your need. | | checkedCheckBoxColor | green | String | change checkbox color when box state is true | | uncheckedCheckBoxColor | black | String | style unchecked box border color when it is unchecked | | checkedBoxContainerStyle | | String | style your checkbox according your needs like give borderRadius, height & width according your need. | | onClick | | function() | callback fun to handle current state of checkbox