290 questions
0
votes
0
answers
41
views
Using `npx knip` to find all unused .svg imports in JS/TS project?
I have a React Native project where I import a lot of .svg files into my components.
How can I use npx knip to find all unused svg files, just like it has found all unused .js/tsx files?
This is my ...
1
vote
1
answer
112
views
Execution failed for task react-native-svg:compileDebugJavaWithJavac AND react-native-safe-area-context:compileDebugKotlin
When trying to run react-native app on android, I get this error:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task '...
0
votes
0
answers
41
views
Render SVG Image from URL in React-Native
In my current project, I have to render SVG images from the URLs in the list view.
I did it using FlatList and react-native-svg, but I am facing a performance issue.
When it renders on display, it ...
0
votes
1
answer
150
views
SVGs not working in expo android app using react-native-svg
I'm trying to use SVG icons in my react native android app (running Expo). I've tried cleaning up the builds, starting fresh but it just does not work at all. Here is a sample source code I've used, ...
0
votes
1
answer
158
views
How can I create a curved "notch" in a custom React Native tab bar using SVG to wrap a central floating button?
I'm building a React Native app and using @react-navigation/bottom-tabs with a custom tabBar component. The tab bar has five tabs, and the central one is a special "camera" button that is ...
0
votes
0
answers
39
views
How to create and use 9-patch images in React Native?
I'm working on a React Native project and want to use 9-patch images (similar to how Android handles scalable images with stretchable regions). These images are useful for backgrounds like buttons or ...
0
votes
0
answers
159
views
react-native-svg - React Native SVG icons are not working after updating 0.77.0 to 0.79.2 ( It was working before version )
Description
SVG images are not showing
`"name": "LearnOn",
"version": "0.0.1",
"private": true,
"scripts": {
"android": &...
0
votes
0
answers
29
views
Syntax Error and Platform-Specific SVG Import Issue in React Native & Next.js Monorepo(tsx)
I'm working on a monorepo project that includes both React Native and Next.js (Web). I'm encountering an issue where I am using react-native-svg for rendering SVGs. The problem arises when the code ...
0
votes
1
answer
35
views
Can we change stroke-width of svg, as we can change stroke color in react-native-svg-transformer?
I just want to know whether is it possible to change stroke-width of svg using .svgrrc file since we can change stroke and fill property.
I tried to change but it didn't work.
.svgrrc:
{
"...
0
votes
0
answers
174
views
Why does the useAnimatedProps not work for applying transformations like transform to an SVG component on iOS and Web using React Native Reanimated?
I am trying to animate a Rect component using react-native-reanimated and react-native-svg. The transform works on Android using useAnimatedProps, but on iOS and Web, the rectangle does not rotate. It ...
0
votes
1
answer
211
views
React Native 0.78 Build Failure: C++ Build System Error with react-native-svg
I am facing a build issue in React Native version 0.78, specifically with react-native-svg. The build fails with the following error:
C++ build system [build] failed while executing
I installed react-...
0
votes
1
answer
190
views
Round path corners with react-native-svg
I would like to see the corners of the following chart rounded as if it were a borderRadius style prop but cannot figure out what pathData element I am missing. It looks like strokeLineJoin and ...
0
votes
0
answers
50
views
How do I create an animatable knob in React Native
So I am working on a pet project of mine to control my water pumping motor from my mobile app with a "timer knob". Basically I am knew to animations in React Native, so need some help in ...
0
votes
0
answers
154
views
boxShadow on React Native 0.76 not working well with the SVG component
CurvedBottomTab
I am implementing an animated bottom tab with a cutout using d3-shape and react-native-reanimated following a guide from a GitHub repository:
https://github.com/hewad-mubariz/...
1
vote
1
answer
104
views
React Native Add To Apple Wallet SVG Failure
I am getting an error when trying to run or build my React Native Expo app. The issue is coming from an SVG that I am using.
At first I thought it was to do with SVGs in general, but I have found out ...
0
votes
1
answer
107
views
React-native elements like <Text> are not rendering inside the <Svg> component on expo web
I have a react-native app built using Expo. I am using react-native-svg to render Svg drawings/shapes. React-native elements like <Text> are not rendering inside the <Svg> component on ...
0
votes
0
answers
339
views
React Native Reanimated interpolateColor issue
I have a simple animated circular progress using react-native-svg and react-native-reanimated.
This is the AnimatedCircle
<Svg height={"90%"} width={"90%"} viewBox="0 0 100 ...
1
vote
0
answers
546
views
How to read SVG asset using react-native-svg-transformer with Expo
I tried to install react-native-svg-transformer into my Expo project, so I can
load PNG and other image files from assets,
transform SVG files,
use @/src/... as alias.
When I start the project, I ...
1
vote
0
answers
48
views
Am trying to create a progress ring that has 1 point on top of each other at complete rotation
Am trying to create a progress ring or circular progress that looks like the image below 👇
(https://i.sstatic.net/AJWAj408.jpg)
But I can't seem to get that clipping effect. This is what I always end ...
2
votes
3
answers
692
views
Progress border around an Elliptical or Rounded-Rectangular View in React Native
I'm working on a React Native project where I need to display a progress indicator that outlines a non-circular view.
I tried using react-native-svg with the Circle component to create a circular ...
0
votes
1
answer
164
views
React Native DWG to SVG conversion issue
I am building a facility management app. I have been given a .DWG file of the floor plan that I want to show on the app and make the desks and chairs clickable so that employees of that facility can ...
0
votes
1
answer
227
views
massive frame drops on reanimated pinch and pan gesture using reanimated on react-native-svg
I am trying to implement pinch and pan gestures to move and zoom an SVG. This SVG has multiple paths, and I am trying to implement zoom without losing any quality of the SVG, so I have to scale the ...
0
votes
1
answer
213
views
SVG Path with Rounded Ends
I'm trying to create a filled ellipse graph in React Native using react-native-svg that visually indicates a percentage. The filled part should have rounded ends, but I'm struggling to get the ...
0
votes
1
answer
3k
views
Using Playwright - how to test SVG image by d values?
In the website I'm automating, there are SVG images with icons.
In once scenario, the SVG has a special arrow that points up and right.
<svg class="SecretClass" focusable="false" viewBox="0 0 ...
1
vote
2
answers
838
views
Cannot build my app on Expo due to dependency issue with React Native svg charts
I have recently made an app and I am trying to build it for TestFlight.
In my app I started using react-native-svg-charts which uses react-native-svg.
These are the version in my package.json:
"...
0
votes
0
answers
60
views
React Native Remote SVG use
I am using react native 0.73 and trying to use remote svg images. SVG url https://hdor.com/app/assets/images/hdor-2021-icons/badges/bw/25km.svg this is the url which i am trying to use in my ...
0
votes
1
answer
416
views
Error trying to use react-native-chart-kit
I have this error every time I install react-native-chart-kit using expo and try to run the server
ERROR Invariant Violation: Tried to register two views with the same name RNSVGRect, js engine: ...
1
vote
1
answer
1k
views
React Native v0.74.1 unable to resolve module when importing svg
I can't show the svg files on the new React Native version (0.74.1). I've added:
react-native-svg-transformer and react-native-svg
I followed the documentation and created the file declarations.d.ts ...
0
votes
1
answer
66
views
In SVG, how to center Text along a path?
Objective: Create a curved Path from A to B. Center the text on the path.
It doesn't seem like this is possible.
In my example below, startOffset=50% will begin the text at the 50% mark. However, I'd ...
-1
votes
0
answers
65
views
SVG separately animation
i am trying to code an Analog Clock using React Native, React Native SVG.
this must be set by hand. i don't want to code dynamic clock. (There are tons of them on the internet.) i want to code just a ...
1
vote
1
answer
323
views
React native svg transformer does not color svg using replaceAttrValues
I'm trying to color a svg using react-native-svg-transformer and react-native-svg but it does not work. I have the impression that the file .svgrrc is not taken into consideration because wether I ...
2
votes
1
answer
4k
views
Adding react-native-svg gives error - FAILURE: Build failed with an exception
When trying to run react-native app on android, I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-svg:compileDebugJavaWithJavac'.
&...
-1
votes
1
answer
93
views
SVG not filling out like fontawesome icons like it has padding or whitespace
Can anyone tell me why this custom SVG on the right won't fill the height like the icon on the right does? The SVG does not have any space on the top and right when opened in Illustrator.
Current SVG ...
0
votes
1
answer
55
views
Issue in svg images
I am using svg images as i thought these are hight resolution images and auto adjust according to height of screen as i am using it in mobile device but when i check the app in the tablet it got blur ...
1
vote
1
answer
2k
views
Problem with `react-native-svg` in Expo app
I'm encountering an issue while using the react-native-svg library in my Expo app. The error message I'm seeing is:
View config getter callback for component RNSVGPath must be a function (received ...
1
vote
0
answers
101
views
Cannot build EAS Project, Invalid regular expression: Range out of order in character class
I encountered an error while building my Expo application with EAS. I used the following command:
eas build -p android --profile preview
The error message is as follows:
Loaded "env" ...
0
votes
1
answer
208
views
How to center an SVG within another SVG group
My goal is to center the golden icons inside the black rim.
Below is my code that loops over the arcs created using d3 and the Icon component nested in the SVG group is what I am trying to position ...
4
votes
0
answers
747
views
Uncaught TypeError: (0 , _reactNative.requireNativeComponent) is not a function
My website used react-native-web and I am getting the following error when I am importing Alert or WarningOutlineIcon from native base
Error
Uncaught TypeError: (0 , _reactNative....
3
votes
1
answer
1k
views
Invariant Violation: requireNativeComponent: "RNSVGSvgView" was not found in the UIManager
I am on a React Native project, I tried to use chart related dependencies in my project, and I have tried @rainbow-me/animated-charts and react-native-wagmi-charts, and all of them leads to the same ...
1
vote
0
answers
899
views
React Native segmented circular progress bar
I am trying to create a Segmented Circular progress bar (where each segment can have its own size) by using the 'react-native-svg'
here is my code:
const SMCircle = ({ segments }) => {
const ...
1
vote
2
answers
595
views
How to optimize custom svg component in react or react native to only import / load used svg
I am creating a custom category component that will load all of my SVGs listed in an object.
import { type SvgProps } from 'react-native-svg';
import FoodAndDrink from './icon-svgs/food-and-drink.svg'...
1
vote
0
answers
55
views
How to search the JSX file in react native
I have a svgComponent JSX file in react native. in that I have almost 200 path components. i want to plot some circle on this world map based on data getting from API.
how to search the path component ...
1
vote
1
answer
366
views
Masking Image With Hollow Circle Shape & Blur
I'm trying to create the below crude example using react-native-svg.
The background image is dynamic and requires a hollow circular mask. This also needs to blur that section of the background image. ...
1
vote
1
answer
1k
views
Custom fonts are not rendered in RN-SVG <Text/>
In my code I tried to:
import { useFonts } from 'expo-font'
useFonts( {
'Robo Numbers':require( '../assets/fonts/my-custom.ttf' ),
} )
Now when I render the RN own or RN-Paper's Text element, the ...
1
vote
0
answers
176
views
Interpolating color of a custom Animated component in react native
I created a custom animated component in react native like this:
const AnimatedPath = Animated.createAnimatedComponent(Path);
where Animated is imported from react-native and Path is imported from ...
0
votes
1
answer
275
views
How to calculate viewbox for an individual path in a svg in react native
I am trying to make every path of svg as independent svg.
I wasn't able to find any method to directy get the viewbox for a path.
take this svg as example:
import Svg, { Path } from 'react-native-svg';...
0
votes
0
answers
138
views
How to highlight nested elements inside SVG and change their color or highlight them in react native
We have a map of a mall which is an image(SVG, or PNG), I'm asked to do the following:
there is an input above the Map where user can look for a store by name, when a store is chosen it should be ...
5
votes
0
answers
225
views
React-Native-SVG: Masked elements pixelated in android emulator
In my app I have this code:
<Svg width={W} height={H} viewBox={viewBox} style={style} preserveAspectRatio="none">
<Defs>
<Mask id="mask" x={0} y={0}...
1
vote
1
answer
433
views
How can I make a circular graph with SVG in React Native?
I'm trying to draw a circular graph with SVG in React Native. I want to add a stroke to the chart. How can I do it?
I did this.
This is what I want to do.
Code:
return (
<View style={{ ...
0
votes
1
answer
2k
views
Bar graph is not centering when using the bar graph from react-native-chart-kit module
I am trying to align this react-native-chart-kit bar graph to the center.
Bar Chart
This is code that I have currently:
<BarChart
data={{
labels: ["SU", "...