Skip to content

GlassCard

Frosted-glass surface with optional native blur.

GlassCard uses expo-blur when it is installed in your app. If expo-blur is not present, the component falls back to a translucent background — no crash, but no native blur effect.

Expo:

Terminal window
npx expo install expo-blur

Bare React Native: install and configure expo-blur per Expo docs, or use the fallback appearance.

import { GlassCard } from '@truongdq01/ui';
import { Text } from 'react-native';
<GlassCard intensity={40} style={{ padding: 16 }}>
<Text>Content on glass</Text>
</GlassCard>
PropTypeDefaultDescription
intensitynumber40Blur strength (0–100). Only applies when expo-blur is installed.
tint'light' | 'dark' | 'default'theme-basedexpo-blur tint.
borderRadiusnumberradius.xlCorner radius.
styleStyleProp<ViewStyle>—Outer container style.
childrenReactNode—Card content.

Inherits View props except where overridden above.

See Component status — beta (optional native module).