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

@viktorvojtek/react-native-simple-components

v1.0.32

Published

Collection of essential UI components based on react-native components

Downloads

180

Readme

@viktorvojtek/react-native-simple-components

This package contains a collection of a few essential, customizable and reusable UI components built with React on top of React Native components. These components are designed to be easy to use, highly flexible and allowing you to quickly and easily build beautiful user interfaces for your projects.

This package inherits react native components such as buttons, spinner, text, scrollview, and more. Each component is just a react native component with enhanced list of style props, to directly style a component via props.

This approach leads to increased development speed when building UI without compromising app performance at all. That being said we are building pure React Native components (best for performance), that can be styled as quickest as possible via props only.

As mentioned above, this package is really simple and easy to use. It's a great choice for beginners and experienced developers alike, when you need to build a UI quickly and easily, right out of the box. There is no configuration to be set up, no boilerplate code to write. And it comes with TypeScript support out of the box with all the types and beauty of intellisense.

I hope you find this components package useful in your projects. If you have any questions or feedback, please don't hesitate to reach out to me. Thank you for using this package!

Installation

Make sure you have installed React Native of version 0.60 or higher.

NPM:

$ npm -i @viktorvojtek/react-native-simple-components

Yarn:

$ yarn add @viktorvojtek/react-native-simple-components

Documentation

Usage Example

import { Button, Stack, Text } from '@viktorvojtek/react-native-simple-components';

const App = () => {
  return (
    <Stack
      flexDirection="column"
      backgroundColor="red"
      borderWidth={1}
      borderColor="blue"
    >
      <Button
        onPress={() => console.log('Button pressed')}
        backgroundColor="green"
        borderRadius={10}
        padding={10}
      >
        <Text color="white">Button</Text>
      </Button>
    </Stack>
  );
};

Components

| Component | Props | Description | Defaults | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------- | | Button | Pressable props , View Style props | A basic button component | | | Center | View Style props | A component that centers it's children components both horizontally and vertically | | | Circle | size: Number | undefined, View Style props | A component that renders a circle | size: 40bgColor: '#d3d3d3' | | Checkbox | children: ReactNode | undefined, isChecked: boolean | undefined, onChange: (isChecked: boolean) => void | undefined, View Style props | A checkbox component | | | Divider | color: Color | String, isVertical: boolean | undefined, View Style props | A component that renders a divider line | color: '#d3d3d3'isVertical: false | | Image | Image props , View Style props | Replacement for Image component | | | Pressable | Pressable props , View Style props | Replacement for Pressable component | | | Spinner | ActivityIndicator props , View Style props | Displays a circular loading indicator | | | Stack | View Style props | Replacement for View component | | | StackX | View Style props | A Stack component rendering it's children components horizontally by default | | | StackY | View Style props | A Stack component rendering it's children components vertically by default | | | Text | Text props , Text Style props | Replacement for Text component | | | TextInput | TextInput props , TextInput Style props | Replacement for TextInput component | |

Shorthand Props

| Prop Name | Description | Type | Default | | --------- | ------------------ | ------------------------------------- | --------- | | bgColor | Background color | Color | String | undefined | '#d3d3d3' | | m | Margin | Number | String | undefined | 0 | | mt | Margin top | Number | String | undefined | 0 | | mr | Margin right | Number | String | undefined | 0 | | mb | Margin bottom | Number | String | undefined | 0 | | ml | Margin left | Number | String | undefined | 0 | | mx | Margin horizontal | Number | String | undefined | 0 | | my | Margin vertical | Number | String | undefined | 0 | | | | | | | p | Padding | Number | String | undefined | 0 | | pt | Padding top | Number | String | undefined | 0 | | pr | Padding right | Number | String | undefined | 0 | | pb | Padding bottom | Number | String | undefined | 0 | | pl | Padding left | Number | String | undefined | 0 | | px | Padding horizontal | Number | String | undefined | 0 | | py | Padding vertical | Number | String | undefined | 0 |

Note: All shorthand props can be used with all components such as: Button, Center, Circle, Divider, Image, Pressable, Spinner, Stack, StackX, StackY, Text, TextInput

Note: style prop still works as all othern React Native props and APIS for related components