An open API service indexing awesome lists of open source software.

https://github.com/lewiscasewell/react-native-patterns

React native component library that allows you to build reproducible and abstract patterns. Useful for fallbacks for images, e.g. Avatars or list items
https://github.com/lewiscasewell/react-native-patterns

react-native react-native-skia

Last synced: 5 months ago
JSON representation

React native component library that allows you to build reproducible and abstract patterns. Useful for fallbacks for images, e.g. Avatars or list items

Awesome Lists containing this project

README

          

# react-native-patterns

### A react native component library that allows you to build reproducible abstract patterns for your application.

This library was built using `@shopfiy/react-native-skia`

Screenshot 2023-11-08 at 14 27 58

## Features

- uniqueKey prop allows you to assign a pattern to an id, so that it will be the same every time
- Can blur, or add an overlay, or custom styles
- Works just like a View component
- Written in typescript
- Compatible with expo

![Screen Recording 2023-11-28 at 11 35 30](https://github.com/lewiscasewell/react-native-patterns/assets/64678409/864c8443-c321-44ab-9015-454a94b72524)

## Installation

```bash
yarn add @shopify/react-native-skia
yarn add react-native-patterns
```

## Usage

### MeshGradient

```tsx
import { MeshGradient } from 'react-native-patterns';

const uniqueKey = 'some-unique-key'; // such as an id
const someNiceColors = ['#51C4D3', '#FF2BF1', '#32FF2B', '#311263'];

function App() {
return (

);
}
```

Or you can also choose to wrap around other components…

```tsx

Hello, world!

```

If using in list, would recommend using with `@shopify/flash-list` for better performance.

### Grid

```tsx
import { Grid } from 'react-native-patterns';

const uniqueKey = 'some-unique-key'; // such as an id

function App() {
return (

);
}
```