Skip to content

wix/react-native-ui-lib

Folders and files

NameName
Last commit message
Last commit date
Jul 7, 2022
Dec 31, 2024
Nov 6, 2024
Feb 18, 2025
Apr 24, 2025
Apr 14, 2025
Apr 28, 2025
Oct 9, 2024
Mar 20, 2025
Dec 15, 2022
Apr 10, 2025
Dec 31, 2024
Jan 22, 2025
Apr 28, 2025
Apr 28, 2025
Apr 6, 2022
Mar 25, 2025
Oct 18, 2022
Dec 30, 2020
Mar 9, 2025
Nov 13, 2024
May 12, 2024
Sep 16, 2020
Mar 10, 2023
Feb 8, 2017
Mar 28, 2024
Nov 6, 2024
Nov 15, 2022
Nov 6, 2024
Dec 4, 2024
Mar 7, 2017
Feb 11, 2025
Jan 25, 2023
Nov 1, 2018
Nov 6, 2024
Feb 16, 2025
Mar 2, 2017
Nov 6, 2024
Apr 10, 2025
Dec 31, 2024
Jan 1, 2025
May 9, 2023
Feb 12, 2025
Apr 10, 2025

Repository files navigation

SWUbanner

UI Toolset & Components Library for React Native


Build Status npm NPM Downloads Follow on Twitter

Notes

React Native New Arc

We are working on upgrading our UI Library to support the new React Native Architecture. Currently, we support React Native 0.73, and we plan to support React Native 0.77 next. While we don’t have a timeline yet, this is part of our roadmap.

Links

Download our Expo demo app

(You will need the Expo App) or open link in your devices [expo ] exp://exp.host/@vn.chemgio/rnuilib?release-channel=default

Installing

See setup instructions here.

New Major Version 6.0

See breaking changes

For React Native >= 0.60.0

please use react-native-ui-lib

For React Native < 0.60.0

please use react-native-ui-lib@^3.0.0

Create your own Design System in 3 easy steps

Step 1

Load your foundations and presets (colors, typography, spacings, etc...)

// FoundationConfig.js

import {Colors, Typography, Spacings} from 'react-native-ui-lib';

Colors.loadColors({
  primaryColor: '#2364AA',
  secondaryColor: '#81C3D7',
  textColor: '##221D23',
  errorColor: '#E63B2E',
  successColor: '#ADC76F',
  warnColor: '##FF963C'
});

Typography.loadTypographies({
  heading: {fontSize: 36, fontWeight: '600'},
  subheading: {fontSize: 28, fontWeight: '500'},
  body: {fontSize: 18, fontWeight: '400'}
});

Spacings.loadSpacings({
  page: 20,
  card: 12,
  gridGutter: 16
});

Step 2

Set default configurations to your components

// ComponentsConfig.js

import {ThemeManager} from 'react-native-ui-lib';

// with plain object
ThemeManager.setComponentTheme('Card', {
  borderRadius: 8
});

// with a dynamic function
ThemeManager.setComponentTheme('Button', (props, context) => {
  // 'square' is not an original Button prop, but a custom prop that can
  // be used to create different variations of buttons in your app
  if (props.square) {
    return {
      borderRadius: 0
    };
  }
});

Step 3

Use it all together. Your configurations will be applied on uilib components so you can use them easily with modifiers.

// MyScreen.js

import React, {Component} from 'react';
import {View, Text, Card, Button} from 'react-native-ui-lib';

class MyScreen extends Component {
  render() {
    return (
      <View flex padding-page>
        <Text heading marginB-s4>
          My Screen
        </Text>
        <Card height={100} center padding-card marginB-s4>
          <Text body>This is an example card </Text>
        </Card>

        <Button label="Button" body bg-primaryColor square></Button>
      </View>
    );
  }
}

Contributing

See Contribution Guide