# Grain Gradient — React Native component for Expo

> A soft blob gradient with real film grain, plus a grain overlay for anything.

A soft mesh-style gradient — a base colour with blurred colour blobs — finished with real film grain. Twelve palettes or your own colours. Use it as a screen or card background, or behind glass so there is something to refract. GrainOverlay adds the same grain to anything, photos included.

- Docs: https://expokit.in/docs/components/grain
- Tier: Free
- Also called: grain gradient, noise gradient background, mesh gradient
- Category: Display
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Hero, Palettes, Custom

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add grain
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { GrainGradient } from "@/components/ui/grain";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `palette` | `sunset \| ocean \| aurora \| dusk \| peach \| graphite \| ember \| mint \| lavender \| candy \| forest \| noir` | `"sunset"` | Built-in colour set. |
| `colors` | `string[]` | — | Base colour first, then up to four blob colours. Overrides palette. |
| `grain` | `number` | `0.55` | Grain strength, 0–1. |
| `seed` | `number` | `0` | Shuffles where the blobs sit. |
| `style` | `StyleProp<ViewStyle>` | — | Root style; give it a size or flex: 1. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |
| `GrainOverlay grain` | `number` | `0.55` | Grain only, laid over its parent. |

## Behaviour & accessibility

- **Gradient**: A base colour with up to four radial blobs, drawn with react-native-svg so it scales to any size.
- **Grain**: A tiny tiling noise image drawn at 2×, so the speckle stays fine on every screen; grain sets its strength.
- **Touch**: The gradient and grain never take touches; children render on top.

## FAQ

### How do I make a grain gradient in React Native?

Use ExpoKit's Grain Gradient: run npx @expokit/cli@latest add grain in your Expo or React Native project and it copies a ready-made grain gradient into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Grain Gradient work in Expo Go?

Yes. Grain Gradient runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Grain Gradient to my Expo app?

Run npx @expokit/cli@latest add grain in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Grain Gradient free?

Yes. Grain Gradient is free: its full source is on this page and the CLI installs it without an account.

## More

- Live preview, variants and code: https://expokit.in/docs/components/grain
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
