From 59398ed1448ab237902312e92f33ca2abfddc7d3 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Fri, 25 Sep 2026 11:58:26 -0400 Subject: [PATCH] Replace deprecated ImageBackground examples --- docs/animations.md | 10 +++++++--- docs/images.md | 11 +++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/animations.md b/docs/animations.md index 7619c6713d4..3c7ae0cbbb8 100644 --- a/docs/animations.md +++ b/docs/animations.md @@ -314,7 +314,7 @@ import { Text, StyleSheet, View, - ImageBackground, + Image, Animated, useWindowDimensions, useAnimatedValue, @@ -356,13 +356,17 @@ const App = () => { - + + {'Image - ' + imageIndex} - + ); })} diff --git a/docs/images.md b/docs/images.md index 0445967067d..f6b16f8010f 100644 --- a/docs/images.md +++ b/docs/images.md @@ -250,19 +250,18 @@ On the user side, this lets you annotate the object with useful attributes such ## Background Image via Nesting -A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `` component, which has the same props as ``, and add whatever children to it you would like to layer on top of it. - -You might not want to use `` in some cases, since the implementation is basic. Refer to ``'s [documentation](imagebackground.md) for more insight, and create your own custom component when needed. +To layer content over an image, render an absolutely positioned [`Image`](image.md) inside a [`View`](view.md), followed by the content that should appear on top. ```tsx return ( - + + Inside - + ); ``` -Note that you must specify some width and height style attributes. +Note that you must specify some width and height style attributes on the containing `View`. ## iOS Border Radius Styles