SVG
The SVG component is used to display SVG (Scalable Vector Graphics) images. It supports loading SVG content from the following sources:
- A remote URL
- A local file path
- Inline SVG code
SVGs are rendered as bitmap images. You can choose to render them in template mode to apply tint colors using foregroundColor.
Import
Props
Image Source (choose exactly one)
These three props are mutually exclusive — only one should be provided.
Rendering Behavior (ImageRenderingBehaviorProps)
resizable Prop Details
Examples
Display SVG from a local file (template mode with tint)
Display SVG from inline code
Notes
- SVGs are now rendered as bitmap images only.
- The
vectorDrawingprop has been removed and is no longer supported. - To apply tinting, use
renderingMode="template"along withforegroundColor. - Only one of
url,filePath, orcodemay be specified at a time.
