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 从公开仓库中收录这些内容。

举报或申请下架