Questions tagged [react-native-stylesheet]

React Native Stylesheets provide styling capabilities similar to CSS stylesheets. Use this tag for questions about working with React Native Stylesheets or styling React Native code in general.

React Native Stylesheets provide styling capabilities similar to CSS stylesheets.

See https://reactnative.dev/docs/stylesheet.html for more info.

210 questions
1
vote
1 answer

How to give different style to the first array of Flatlist

How is it possible to make first array of database looks different in size in a Flatlist?
1
vote
2 answers

How to add inner-shadow on image React-Native

How can i apply buttom inner shadow like this image in react native? Buttom inner shadow
Arsiki
  • 348
  • 2
  • 12
1
vote
1 answer

overflow-y in react native

Is there any way by which we can simulate the overflow-y: hidden (MDN Docs) style in react-native StyleSheet?
Kuncheria
  • 1,182
  • 9
  • 16
1
vote
2 answers

Convert Tailwind classes to css inline style

In these days i'm struggling with the conversion from a react app to a react-native app; in this react app i used tailwind to stylize components thus i need to convert tailwind classes to inline css so that i can convert it to react native…
GabryLinux
  • 155
  • 3
  • 8
1
vote
0 answers

React Native Styling & Flex -- Centering A Component

I'm having incredible difficulty figuring out why my stylesheet isn't working the way that I want it to -- I want both the icon [note the comments] as well as the button on the bottom to appear centered, but both currently appear left-aligned. Would…
polka
  • 11
  • 2
1
vote
1 answer

How to apply styles using styleSheet in react native expo

I am trying to apply some styles in my react native application but it's not working with me, I tried to run it in the browser this is the output showed up: But when I run it in my phone it's showing me an error: This is the main App.js…
DEV
  • 65
  • 9
1
vote
1 answer

Object in StyleSheet in React Native

I'd like to know if there is something like what can be done in .less with StyleSheet object in React Native to group some objects. For example if I render something like this :
1
vote
0 answers

How do i add a background to the sticky section header in react-native using Sectionlist?

In react-native, using SectionList, I want to have a sticky section header with a background color, but only when the element is sticky. What I've done so far, is to set a views position to absolute. The problem is that I can't find a way to get the…
1
vote
1 answer

How to draw a circle ring

I would like to draw a circle ring in react-native project. I would like the circle ring component be customised in its size when using it. Here is what I tried: import React from 'react'; import {View, StyleSheet, TouchableOpacity} from…
Leem.fin
  • 40,781
  • 83
  • 202
  • 354
1
vote
1 answer

Animated image does not have transparent background

In my react-native application, I want to render a spinning logo as the right header for a screen. }} /> And the spinner component…
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
1
vote
1 answer

React Native - stickyHeaderIndices not working for SectionList

I am trying to make some header to stick to the top of the SectionList but it seems like the stickyHeaderIndices={[0]} doesn't work as expected. This is the section list: (productsSectionListRef = ref)} …
1
vote
2 answers

How to keep absolute Touchables consistent across various screen sizes?

I have a screen with an png image, I am trying to add touchables on the joints. I want to keep touchabes consistent across screen sizes This is my code import { Platform, ImageBackground, View, StyleSheet, TouchableOpacity, …
1
vote
0 answers

React Native Stylesheet not working until refresh

My compontent has a within a . import React from "react"; import { Text, View, StyleSheet} from "react-native"; import { BlurView } from "@react-native-community/blur"; const styles = StyleSheet.create({ blurView: { …
1
vote
2 answers

React Native how to wrap component into TouchableOpacity within a Text

I was building terms and condition text and I want my Terms and Conditions to have a TouchableOpacity behavior, same goes to PrivacyPolicy This is what it looks like below: Now I want to add TouchableOpacity behavior to Terms & Conditions same with…
1
vote
1 answer

How to style component in React Native dynamically?

I'm using the AirbnbRating component from this package. The problem is with styling it dynamically as I'm using a global style file and defining all my styles there. I need to change the size prop of AirbnbRating from that styles.js file. Here is my…
Amine
  • 2,241
  • 2
  • 19
  • 41