This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Image A SwiftUI Image component for displaying SF Symbols.
Recommended version:
~55.0.17
Expo UI Image displays SF Symbols using the SwiftUI Image API . SF Symbols are a library of configurable symbols provided by Apple.
Installation
- npx expo install @expo/ui
- yarn expo install @expo/ui
- pnpm expo install @expo/ui
- bun expo install @expo/ui
If you are installing this in an existing React Native app , make sure to install expo in your project.
Usage
Basic SF Symbol
import { Host , Image } from '@expo/ui/swift-ui' ;
export default function BasicImageExample ( ) {
return (
< Host matchContents >
< Image systemName = " star.fill" />
</ Host >
) ;
}
With size and color
ImageSizeColorExample.tsx import { Host , HStack , Image } from '@expo/ui/swift-ui' ;
export default function ImageSizeColorExample ( ) {
return (
< Host matchContents >
< HStack spacing = { 16 } >
< Image systemName = " heart.fill" size = { 24 } color = " red" />
< Image systemName = " star.fill" size = { 32 } color = " orange" />
< Image systemName = " bell.fill" size = { 40 } color = " blue" />
</ HStack >
</ Host >
) ;
}
With variable value
Some SF Symbols alter their appearance based on a variable value. Use the variableValue prop with a value between 0.0 and 1.0 to control the rendered symbol. Requires iOS 16.0+ and SF Symbols 4.0+.
import { Host , HStack , Image } from '@expo/ui/swift-ui' ;
export default function ImageVariableExample ( ) {
return (
< Host matchContents >
< HStack spacing = { 16 } >
< Image systemName = " chart.bar.fill" size = { 32 } variableValue = { 0.3 } />
< Image systemName = " chart.bar.fill" size = { 32 } variableValue = { 0.6 } />
< Image systemName = " chart.bar.fill" size = { 32 } variableValue = { 1.0 } />
</ HStack >
</ Host >
) ;
}
API
import { Image } from '@expo/ui/swift-ui' ;
No API data file found, sorry!