Svg

作者 software-mansion-labse3f00cdb3494無授權條款291 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫10 天前更新

Software Mansion's best practices for SVG rendering in React Native apps using React Native SVG. Use when rendering vector graphics, icons, charts, illustrations, or any SVG content. Trigger on: 'react-native-svg', 'SVG', 'vector graphics', 'render icon', 'draw shape', 'chart', 'path', 'Svg component', 'SvgUri', 'SvgXml', 'SvgCss', 'FilterImage', 'SVG filter', or any request to display scalable vector content in a React Native app.

AI 產生的概覽

指導在 React Native 應用程式中使用 react-native-svg 函式庫渲染 SVG。

功能
提供 Software Mansion 在 React Native 中使用 react-native-svg 渲染 SVG 內容的正式環境實務做法。內容涵蓋安裝該函式庫、從 URI、XML 字串或檔案載入 SVG、套用濾鏡、處理觸控事件、效能考量以及已知問題。它也協助在 react-native-svg、expo-image、@expo/vector-icons、Skia 與 Lottie 之間做選擇。
適用情境
適用於在 React Native 應用程式中渲染向量圖形、圖示、圖表、插圖或其他 SVG 內容時。也適用於為 React Native 專案在 SVG 與圖片渲染函式庫之間做選擇時。
執行需求
沒有指令碼,僅為說明文件。代理可能需要網路存取,以取得所引用的 react-native-svg 使用方式文件。

SVG

Software Mansion's production SVG patterns for React Native using React Native SVG.

For API details on specific components and props, webfetch https://github.com/software-mansion/react-native-svg/blob/main/USAGE.md

References

FileWhen to read
when-to-use.mdDeciding between react-native-svg, expo-image, @expo/vector-icons, Skia, or Lottie
svg.mdInstalling react-native-svg; loading SVGs from URIs, XML strings, or files; filters; touch events; performance considerations; known issues

來源與署名

來源:software-mansion-labs/skills位於skills/react-native-best-practices/references/svg提交e3f00cd

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架