Vue NativeVue Native
Guide
Components
Composables
Navigation
Architecture
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
Architecture
  • iOS
  • Android
  • macOS
GitHub
  • Layout

    • VView
    • VScrollView
    • VSafeArea
    • VKeyboardAvoiding
  • Text & Input

    • VText
    • VInput
  • Interactive

    • VButton
    • VPressable
    • VSwitch
    • VSlider
    • VSegmentedControl
    • VCheckbox
    • VRadio
    • VDropdown
    • VRefreshControl
  • Media

    • VImage
    • VSVG
    • VWebView
    • VVideo
  • Lists

    • VList
    • VFlatList
    • VSectionList
  • Feedback

    • VActivityIndicator
    • VProgressBar
    • VAlertDialog
    • VActionSheet
    • VModal
    • VErrorBoundary
  • Transition & State

    • VTransition & VTransitionGroup
    • KeepAlive
    • VSuspense
  • Navigation

    • VNavigationBar
    • VTabBar
    • VDrawer
  • System

    • VStatusBar
    • VPicker
  • macOS

    • VToolbar
    • VSplitView
    • VOutlineView

VSVG

Renders Scalable Vector Graphics natively — vector-crisp at any resolution. Backed by SVGKit on iOS/macOS and AndroidSVG on Android.

Props

PropTypeDefaultDescription
sourceSVGSource—The SVG to render. Provide exactly one of svg, asset, or uri (see below).
tintColorstring—Optional hex color applied as a tint to the rendered SVG.
styleViewStyle{}Layout/visual style. Set width/height to size the SVG.
accessibilityLabelstring—Accessibility label.
accessibilityRolestring'image'Accessibility role.

SVGSource

Provide exactly one of:

FieldTypeDescription
svgstringInline SVG markup.
assetstringBundled SVG asset name (iOS/macOS main bundle, Android assets/).
uristringRemote SVG URL (loaded asynchronously).

Events

EventPayloadDescription
load—Emitted when the SVG renders successfully.
error—Emitted when parsing or loading fails.

Examples

Inline markup

<template>
  <VSVG
    :source="{ svg: icon }"
    :style="{ width: 24, height: 24 }"
    tintColor="#007AFF"
  />
</template>

<script setup lang="ts">
const icon = '<svg viewBox="0 0 24 24"><path d="M12 2 2 22h20Z"/></svg>'
</script>

Bundled asset

<VSVG :source="{ asset: 'icons/logo' }" :style="{ width: 120, height: 40 }" />

Remote URI

<VSVG
  :source="{ uri: 'https://example.com/diagram.svg' }"
  :style="{ width: 300, height: 200 }"
  @load="onLoad"
  @error="onError"
/>

Notes

  • Set an explicit width/height in style; the SVG scales to fit while preserving its aspect ratio (from its viewBox).
  • Invalid SVG markup emits error rather than crashing.
  • tintColor support depends on the SVG structure; simple single-color icons tint reliably.
Edit this page
Last Updated: 7/28/26, 4:10 PM
Contributors: github-actions[bot]
Prev
VImage
Next
VWebView