gluestack / gluestack-ui

React & React Native Components & Patterns (import from library & copy-paste styles all the way to victory)
https://gluestack.io/
MIT License
1.78k stars 89 forks source link
accessibility component-library customizable-components design-system react react-native styled-components ui ui-components universal-components

gluestack-ui

gluestack-ui logo

Introduction

gluestack-ui is a universal UI library that provides optionally styled and accessible components. These components are designed for easy integration into applications developed with React and React Native.

Documentation

You can find detailed documentation for each component, including a list of props and examples, in https://gluestack.io/ui/docs website.

Features

Installing gluestack-ui

To use gluestack-ui components, all you need to install @gluestack-ui/themed and its dependencies

npm i @gluestack-ui/themed @gluestack-style/react react-native-svg@13.4.0

Tech Stack

JavaScript, React, React Native, Styled System

Usage

To use the gluestack-ui in your project, follow these steps:

  1. Wrap your application with the GluestackUIProvider provided by @gluestack-ui/themed.
import { GluestackUIProvider } from '@gluestack-ui/themed';
import { config } from '@gluestack-ui/config';

// Write this code snippet at the root of your application
function App({ children }) {
  return <GluestackUIProvider config={config}>{children}</GluestackUIProvider>;
}
  1. Now you can use @gluestack-style/react to style your components by using the styled function provided by the library. For example:
import { Button, ButtonText } from '@gluestack-ui/themed';

const StyledButton = styled(
  Pressable,
  {
    bg: '$red500',
    p: '$3',
  },
  {}
);

const StyledButtonText = styled(Text, {}, {});

export const App = () => {
  return (
    <Button>
      <ButtonText>Awesome Button!</ButtonText>
    </Button>
  );
};

More guides on how to get started are available here.

Created By GeekyAnts

GeekyAnts is a team of React Native experts who love open-source and solving developer problems. We’ve been working on React Native since 2015 and have designed and built React Native apps for almost 200+ clients across the globe. Our clients include startups to big enterprises! Need help with your React Native app?

Contact Us

Contributing

We welcome contributions to the gluestack-ui. If you have an idea for a new component or a bug fix, please read our contributing guide instructions on how to submit a pull request.

License

Licensed under the MIT License, Copyright © 2023 GeekyAnts. See LICENSE for more information.