2.0.2 • Published 2 months ago

@ynssenem/lext v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Lext - React Native UI Library

Logo

Lext is a customizable and easy-to-use UI library for your React Native applications. Developed with TypeScript support, this library helps you quickly create user interfaces.

Getting Started

Installation

To add Lext to your project, you can use the following command:

npm install @emotion/native@^11.11.0 @emotion/react@^11.11.1 react-native-gesture-handler@^2.12.0 react-native-reanimated@^3.3.0 @ynssenem/lext@1
# or
yarn add @emotion/native@^11.11.0 @emotion/react@^11.11.1 react-native-gesture-handler@^2.12.0 react-native-reanimated@^3.3.0 @ynssenem/lext@1

Usage

After including Lext in your project, you can easily use the components. Here's a simple example:

// ./index.ts
import React from "react";
import { ThemeProvider, createTheme } from "@ynssenem/lext";
import IndexScreen from "./src/indexScreen";

export default function App() {
  const theme = createTheme({
    colorScheme: "lighten",
    colors: {
      darken: {
        background: "#2B2A4C",
        global: "#FFF",
      },
      lighten: {
        background: "#B4BDFF",
        global: "#000",
      },
    },
  });

  return (
    <ThemeProvider theme={theme} gestureHandlerRootView>
      <IndexScreen />
    </ThemeProvider>
  );
}
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
    plugins: ["react-native-reanimated/plugin"],
  };
};
// ./src/indexScreen.ts
import React from "react";
import { Box, Button, SafeAreaView, useTheme } from "@ynssenem/lext";

const IndexScreen = () => {
  const { colorScheme, setColorScheme } = useTheme();

  return (
    <SafeAreaView>
      <Box flex={1} justifyContent="center" gap={15} alignItems="center">
        <Button
          onPress={() =>
            setColorScheme((prev) => (prev == "lighten" ? "darken" : "lighten"))
          }
          backgroundColor="primary"
          variant="filled"
        >
          changeColorScheme: {colorScheme}
        </Button>
      </Box>
    </SafeAreaView>
  );
};

export default IndexScreen;

For more examples and usage details, you can check our Documentation page.

Contributing

If you want to help make Lext better, please feel free to contribute. You can check our CONTRIBUTING.md file for contribution guidelines.

License

This project is licensed under the MIT License - see the LICENSE.md file for detailed information.


Lext ❤️ React Native

2.0.5

2 months ago

2.0.4

2 months ago

2.0.3

2 months ago

2.0.2

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.7.3

3 months ago

1.7.2

4 months ago

1.7.1

4 months ago

1.7.0

4 months ago

1.6.0

4 months ago

1.5.2

4 months ago

1.5.1

4 months ago

1.5.0

4 months ago

1.4.16

4 months ago

1.4.15

4 months ago

1.4.14

4 months ago

1.4.11

4 months ago

1.4.10

4 months ago

1.4.13

4 months ago

1.4.12

4 months ago

1.4.6

4 months ago

1.4.5

4 months ago

1.4.4

4 months ago

1.4.3

4 months ago

1.4.9

4 months ago

1.4.8

4 months ago

1.4.7

4 months ago

1.4.2

5 months ago

1.4.1

5 months ago

1.3.7

5 months ago

1.4.0

5 months ago

1.2.0

5 months ago

1.3.6

5 months ago

1.3.5

5 months ago

1.3.4

5 months ago

1.3.3

5 months ago

1.3.2

5 months ago

1.3.1

5 months ago

1.3.0

5 months ago

1.2.1

5 months ago

1.1.0

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago