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
2
votes
0 answers

Expo - Failed to compile - Can't resolve '../Utilities/Platform'

I'm using Expo SDK v41 and running into an error while launching Expo web: Failed to compile. /var/www/myapp/node_modules/react-native/Libraries/StyleSheet/processColor.js Module not found: Can't resolve '../Utilities/Platform' in…
Bruno Leveque
  • 2,647
  • 2
  • 23
  • 33
2
votes
2 answers

I have added a picture on bottom. Now my keyboard is not opening

I have added a picture on the bottom of the mobile screen with style as: bottomView: { position: 'absolute', bottom: 0, }, Above this picture, I have my sign-in form, but because the picture is at the absolute position, it is not letting…
2
votes
1 answer

borderRadius is the opposite of react native

I have a problem how can I use react native styles as shown below? Image 1:I have a solution that is separating 2 rectangles and its borderRadius but how do borderRadius compare to its default? Image2: ....
2
votes
1 answer

React Native: last word/character of Text component disappears on Android (not on IOS)

I have a simple Text component with a style in my App. If I add fontweight: 'bold', the last character (sometimes a whole word) disappears. two sample text components: {priceDisplay(deal.price)}
ableryder
  • 31
  • 4
2
votes
2 answers

"TypeError: Cannot read property 'container' of undefined" when adding a global stylesheet to my React project

I am trying to add a global stylesheet in my project as it has same thing on different pages. So, to improve my work I want to do it. Here is my global stylesheet code import {StyleSheet} from 'react-native'; export const globalStyles =…
2
votes
1 answer

Why is flatlist unable to fit in container - React Native

My flatlist is wrapping, but I don't want it to. Is this specific to the data type? Here is the relavant code if I use flatlist:
2
votes
1 answer

React Native cuts off last word in line, but it needs to remove the entire word if it doesn't fit

I'd like the last element in this image to be removed, but so far I can only get it to be cut off. The code is as follows: {item.sortedTagObjects.map(({ tag, color })…
Garrett
  • 11,451
  • 19
  • 85
  • 126
2
votes
1 answer

React Native resizeMode:'contain' not working with expo?

I am working the resizeMode:'contain' because the image is stretching. but the resizeMode not working with expo app. image: { width: 80, height: 80, borderRadius: 10, resizeMode:'contain', },
Mohit Sharma
  • 529
  • 1
  • 6
  • 17
2
votes
1 answer

How to show React Native Modal in center of screen as small window

I want to show my react native modal in the middle of screen even I have done styling but the window appers at the top of my screen but not in the center of screen. This is what I have tried so far:
Talha Nadeem
  • 99
  • 1
  • 4
  • 22
2
votes
1 answer

EStyleSheet Media queries and window resize

I'm using React Native Extended StyleSheet to build a React Native app for WINDOWS. When I use Media queries I get the query of the moment the app is launch, however I need It to be dynamic. When I resize my app window I don't see my styles changing…
1
vote
2 answers

What's the difference of using `array` vs `StyleSheet.compose()` in React Native

As per title: What's the difference of these usages? I can see they all performing the same from UI perspective import { StyleSheet, View } from 'react-native' import type { JSX } from 'react' const App = (): JSX.Element => (
Aelita
  • 87
  • 7
1
vote
1 answer

ignore safe area in Absolute position child view in react native

I am trying to create overlay over the screen. But the problem is child view i.e popup screen also have top and bottom safe area added. I do not want to use this just for 1screen: https://www.npmjs.com/package/react-native-safe-area-context Here is…
IOSDev
  • 205
  • 2
  • 10
1
vote
4 answers

alignItems = "flex-end" not working with onContentSizeChange

I am trying to fix the corner icons to the bottom of the screen regardless the expansion of the text area. I tried with position=absolute and bottom = 0 but it got hidden behind my textArea. Here is what it looks like right now: This is what I…
user2028
  • 163
  • 4
  • 15
  • 40
1
vote
2 answers

Advice needed for ReactJS Equivalent of React-Native-Web stylesheet.flatten

So we are trying to remove React-Native-Web from our codebase, and I was wondering what the ReactJS equivalent of stylesheet.flatten was? We are using it like this; const flattenMyStylesheets = StyleSheet.flatten(styles); const style =…
Takuhii
  • 819
  • 2
  • 8
  • 26
1
vote
2 answers

How to move label along with slider value in React Native

I am working on a React Native Project, I want to move the label along with the slider value. I tried many ways but its not working accurately. Here is my code: import React, { useState } from 'react' import { Text, StyleSheet, View, Dimensions }…
1 2
3
13 14