跳到正文

rit3zh

expo-backdrop

❄️ Native blur views for React Native + Expo.

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

https://github.com/user-attachments/assets/b8a424d1-ae20-49ae-add5-1e9f758d2922

expo-backdrop

Native blur views for React Native + Expo.

Features

  • Two components: BlurView blurs what’s behind it, GaussianBlurView blurs its own children
  • All 21 iOS system materials (systemThinMaterial, systemChromeMaterialDark, …)
  • Custom tintColor when no system material fits your design
  • Per-corner radii that clip the blur and its children
  • Android-specific dials for radius, downsampling, and pass count — so you can match iOS
  • Animatable props, works with Reanimated’s createAnimatedComponent

Installation

bun install expo-backdrop

This module includes native iOS and Android code, so you need to prebuild and run on a device or simulator — Expo Go is not supported.

bunx expo prebuild
bunx expo run:ios
bunx expo run:android

If you’ve already prebuilt your project, just re-run expo run:ios / expo run:android after installing.

Usage

import { BlurView, GaussianBlurView } from 'expo-backdrop';

Quick Start

import { BlurView } from 'expo-backdrop';
import { Image, Text, View } from 'react-native';

export default function App() {
  return (
    
      

      
        Hello from behind the glass
      
    
  );
}

API

Blurs whatever is rendered behind it. Use it for headers, tab bars, floating action bars — anywhere you’d reach for a system material.

PropTypeDefaultDescription
intensitynumber50Blur strength, 0100
tintBlurTint"default"System material washed over the blur
tintColorColorValueCustom colour; replaces tint when set
blurEnabledbooleantrueSet to false to render only the tint
cornerRadiusnumberUniform radius; clips the blur and its children
cornerRadiiCornerRadiiPer-corner radii; takes precedence over the above
styleViewStyleStyle applied to the view

Android-only props

iOS has no equivalent for these — UIVisualEffectView fixes the blur radius per material, and the compositor keeps the backdrop live for free.

PropTypeDefaultDescription
blurReductionFactornumber4Divides the radius intensity maps to — the dial for matching iOS
blurRadiusnumberExplicit radius in dp, overriding intensity
downsampleFactornumber0Downsampling before blurring; higher is cheaper and softer, 0 auto-derives
blurRoundsnumber2Blur passes per capture; more passes soften further
autoUpdatebooleantrueSet to false to freeze the backdrop over static content

Blurs its own children, mirroring SwiftUI’s .blur(radius:opaque:).

PropTypeDefaultDescription
blurRadiusnumber0Blur strength — points on iOS, dp on Android
opaquebooleanfalsefalse lets edges fade out (the signature .blur look); true keeps them solid
styleViewStyleStyle applied to the view
import { GaussianBlurView } from 'expo-backdrop';


  
;

Tints

BlurTint accepts any of the following:

GroupValues
Legacydefault, extraLight, light, dark, regular, prominent
MaterialssystemUltraThinMaterial, systemThinMaterial, systemMaterial, systemThickMaterial, systemChromeMaterial
Light/DarkEach material above with a Light or Dark suffix — e.g. systemThinMaterialDark

Corner Radii

Pass cornerRadius for a uniform radius, or cornerRadii to shape individual corners. Both clip the blur layer and the children, so you don’t need a separate overflow: 'hidden' wrapper.

Full Example

A floating action bar that fades its blur in as the user scrolls:

import { BlurView } from 'expo-backdrop';
import Animated, {
  Extrapolation,
  interpolate,
  useAnimatedScrollHandler,
  useAnimatedStyle,
  useSharedValue,
} from 'react-native-reanimated';

const AnimatedBlurView = Animated.createAnimatedComponent(BlurView);

export default function Screen() {
  const scrollY = useSharedValue(0);

  const scrollHandler = useAnimatedScrollHandler((event) => {
    scrollY.value = event.contentOffset.y;
  });

  const style = useAnimatedStyle(() => ({
    opacity: interpolate(scrollY.value, [0, 300], [0, 1], Extrapolation.CLAMP),
  }));

  return (
    <>
      
        {/* … */}
      

      
    </>
  );
}

Types

import type {
  BlurViewProps,
  GaussianBlurViewProps,
  BlurViewCornerRadii,
  BlurTint,
} from 'expo-backdrop';

Requirements

  • Expo SDK with a development build or bare workflow (Expo Go is not supported)
  • iOS 13+ — BlurView and GaussianBlurView
  • Android — BlurView on all supported versions, GaussianBlurView requires API 31 (Android 12)+
  • Web is not supported; both components throw if rendered there

License

MIT © 2026 Ritesh

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。