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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@herujest/rn-mob-common-ui

v0.4.13

Published

basic ui design system for basic mobile needs

Readme

rn-mob-common-ui

A basic UI design system for mobile applications.

1. Installation

To install the package, use one of the following commands:

npm install @herujest/rn-mob-common-ui
# or
yarn add @herujest/rn-mob-common-ui

2. Getting Started

2.1 Setting Up the ThemeProvider

Wrap your application (or a specific section) with the ThemeProvider component. This ensures theme data are available to all child components.

Example:

import React from 'react';
import ReactDOM from 'react-dom';
import { ThemeProvider } from '@herujest/rn-mob-common-ui';
import App from './App';

ReactDOM.render(
  <ThemeProvider>
    <App />
  </ThemeProvider>,
  document.getElementById('root')
);

3. Components

3.1 Buttons

A customizable button component.

import { Buttons } from 'rn-mob-common-ui';

<Buttons
  type="primary"
  title="Click Me"
  onPress={() => console.log('Button Pressed!')}
/>;

3.2 Icon Component

Render SVG icons easily.

import { Icon } from 'rn-mob-common-ui';

<Icon name="settings" size={24} color="#000" />;

Using Custom Icons

Step 1: Generate JSON with IcoMoon

  • Use IcoMoon App to generate a JSON file.
  • Upload your SVGs and download the JSON.

Step 2: Configure package.json

"@herujest/rn-mob-common-ui": {
  "icon-json-path": "path-to-your-json/customicon.json",
  "output-types-path": "desired-path-to-your-json/IconTypes.ts"
}

Step 3: Generate Icon Types

yarn generate-icon-types

3.3 Text Component

Styled text component with multiple variants.

import { Text } from 'rn-mob-common-ui';

<Text variant="headline1">Hello World!</Text>;

Using Custom Fonts

You can use your own icon vector by following this

Step 1: Add Custom Fonts

Place font files in assets/fonts/:

📂 your-project
 ┣ 📂 assets
 ┃ ┗ 📂 fonts
 ┃   ┣ 🏷 CustomFont-Regular.ttf
 ┃   ┣ 🏷 CustomFont-Bold.ttf
 ┃   ┗ 🏷 CustomFont-Italic.ttf

Step 2: Link Fonts in React Native

Modify react-native.config.js:

module.exports = {
  assets: ['./assets/fonts/'],
};

Run the following command:

npx react-native-asset

Step 3: Apply Custom Fonts in Text Component

import { ThemeProvider, type FontConfig } from '@herujest/rn-mob-common-ui';

const customTheme: FontConfig = {
  bold: 'CustomFont-Bold',
  semibold: 'CustomFont-Regular',
  regular: 'CustomFont-Bold',
};

const App = () => (
  <ThemeProvider theme={customTheme}>
    <Text variant="headline1">Hello, Custom Font!</Text>
  </ThemeProvider>
);

export default App;

Step 4: Use Custom Fonts

import { Text } from '@herujest/rn-mob-common-ui';

const App = () => <Text variant="headline1">Hello, Custom Font!</Text>;

export default App;

3.4 Container Component

A base component that wraps content inside a SafeAreaView, ensuring proper layout and spacing.

import { Container } from 'rn-mob-common-ui';

<Container>
  <Text>Safe and sound!</Text>
</Container>;

3.5 Content Component

A scrollable content area that ensures the keyboard does not overlap input fields.

import { Content } from 'rn-mob-common-ui';

<Content>
  <Text>Scrollable Content Here</Text>
</Content>;

3.6 InputField Component

A labeled input field with validation styles.

import { InputField } from 'rn-mob-common-ui';

<InputField
  label="Username"
  value={username}
  onChangeText={setUsername}
  error={!!error}
  placeholder="Enter your username"
/>;

3.7 Modal & Popup Components

Reusable modal and popup components.

import { Modal, Popups } from 'rn-mob-common-ui';

// Example usage

3.8 EmptyView Component

Displays empty states with an image and description.

import { EmptyView } from 'rn-mob-common-ui';

<EmptyView
  description="No Data Found"
  imageSource={require('./path/to/image.png')}
/>;

3.9 Theme Context

Use the theme context to access and switch between light and dark themes dynamically.

import { ThemeProvider, useTheme } from 'rn-mob-common-ui';

const App = () => {
  const { toggleTheme, colors } = useTheme();

  return (
    <ThemeProvider>
      <Text style={{ color: colors.basic1 }}>Theme-based Text</Text>
    </ThemeProvider>
  );
};

4. Contributing

To contribute, please check the Contributing Guide for setup instructions and best practices.


5. License

This project is licensed under the MIT License.