- Saved searches
- Use saved searches to filter your results more quickly
- vhpoet/react-native-styling-cheat-sheet
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- [Solved]-React Native :after styling like css-React Native
- Related Query
- More Query from same tag
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Most of the React Native styling material in one page
vhpoet/react-native-styling-cheat-sheet
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
React Native Styling Cheat Sheet
Most of the React Native styling material in one page. Imported from the official docs.
- properties with default value auto marked with asterisk do not actually have auto as their default value, they just behave like if they would in css if they had auto as their value. auto is not valid value for those properties in react-native
Name | Type | Description |
---|---|---|
shadowColor | customColorPropType | Sets the drop shadow color |
shadowOffset | customReactPropTypes.shape( ) | Sets the drop shadow offset |
shadowOpacity | number | Sets the drop shadow opacity (multiplied by the color’s alpha component) |
shadowRadius | number | Sets the drop shadow blur radius |
Name | Type |
---|---|
decomposedMatrix | customDecomposedMatrixPropType |
transform | customReactPropTypes.arrayOf( ReactPropTypes.oneOfType([ ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape(), ReactPropTypes.shape() ]) ) |
transformMatrix | customTransformMatrixPropType |
Name | Type | Platforms | Description |
---|---|---|---|
. Flexbox | |||
. ShadowPropTypesIOS | |||
. Transforms | |||
backfaceVisibility | oneOf visible , hidden | ||
backgroundColor | ColorPropType | ||
borderBottomLeftRadius | number | ||
borderBottomRightRadius | number | ||
borderColor | ColorPropType | ||
borderRadius | number | ||
borderTopLeftRadius | number | ||
borderTopRightRadius | number | ||
borderWidth | number | ||
opacity | number | ||
overflow | oneOf visible , hidden | ||
resizeMode | oneOf cover , contain , stretch , repeat , center | Determines how to resize the image when the frame doesn’t match the raw image dimensions. Visit the official docs for a guide on each | |
tintColor | ColorPropType | Changes the color of all the non-transparent pixels to the tintColor. | |
overlayColor | string | android | When the image has rounded corners, specifying an overlayColor will cause the remaining space in the corners to be filled with a solid color. This is useful in cases which are not supported by the Android implementation of rounded corners: — Certain resize modes, such as ‘contain’ — Animated GIFs A typical way to use this prop is with images displayed on a solid background and setting the overlayColor to the same color as the background. For details of how this works under the hood, see http://frescolib.org/docs/rounded-corners-and-circles.html |
Name | Type | Platforms | Description |
---|---|---|---|
. Flexbox | |||
. ShadowPropTypesIOS | |||
. Transforms | |||
backfaceVisibility | oneOf visible , hidden | ||
backgroundColor | ColorPropType | ||
borderBottomColor | ColorPropType | ||
borderBottomLeftRadius | number | ||
borderBottomRightRadius | number | ||
borderBottomWidth | number | ||
borderColor | ColorPropType | ||
borderLeftColor | ColorPropType | ||
borderLeftWidth | number | ||
borderRadius | number | ||
borderRightColor | ColorPropType | ||
borderRightWidth | number | ||
borderStyle | oneOf solid , dotted , dashed | ||
borderTopColor | ColorPropType | ||
borderTopLeftRadius | number | ||
borderTopRightRadius | number | ||
borderTopWidth | number | ||
borderWidth | number | ||
opacity | number | ||
overflow | oneOf visible , hidden | ||
elevation | number | android | (Android-only) Sets the elevation of a view, using Android’s underlying elevation API. This adds a drop shadow to the item and affects z-order for overlapping views. Only supported on Android 5.0+, has no effect on earlier versions. |
Name | Type | Platforms | Description |
---|---|---|---|
. View | |||
color | ColorPropType | ||
fontFamily | string | ||
fontSize | number | ||
fontStyle | oneOf normal , italic | ||
fontVariant | arrayOf(oneOf small-caps , oldstyle-nums , lining-nums , tabular-nums , proportional-nums ) | ios | |
textTransform | oneOf none , uppercase , lowercase , capitalize | ||
fontWeight | oneOf normal , bold , «100» , «200» , «300» , «400» , «500» , «600» , «700» , «800» , «900» | Specifies font weight. The values ‘normal’ and ‘bold’ are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. | |
includeFontPadding | bool | android | Set to false to remove extra font padding intended to make space for certain ascenders / descenders. With some fonts, this padding can make text look slightly misaligned when centered vertically. For best results also set textAlignVertical to center. Default is true. |
lineHeight | number | ||
textAlign | oneOf auto , left , right , center , justify | Specifies text alignment. The value ‘justify’ is only supported on iOS and fallbacks to left on Android. | |
textDecorationLine | oneOf none , underline , line-through | ||
textShadowColor | ColorPropType | ||
textShadowOffset | ReactPropTypes.shape( ) | ||
textShadowRadius | number | ||
textAlignVertical | oneOf auto , top , bottom , center | android | |
letterSpacing | number | ios | |
textDecorationColor | ColorPropType | ios | |
textDecorationStyle | oneOf solid , double , dotted , dashed | ios | |
writingDirection | oneOf auto , ltr , rtl | ios |
Name | Type | Platforms | Description |
---|---|---|---|
autoFocus | bool | If true, focuses the input on componentDidMount. The default value is false. | |
keyboardType | oneOf default , email-address , numeric , phone-pad , // iOS-only ascii-capable , numbers-and-punctuation , url , number-pad , name-phone-pad , decimal-pad , twitter , web-search | Determines which keyboard to open | |
maxLength | number | Limits the maximum number of characters that can be entered | |
onChangeText | callback func | Callback that is called when the text input’s text changes. Changed text is passed as an argument to the callback handler. |
Name | Type | Platforms | Description |
---|---|---|---|
. Flexbox | |||
. ShadowPropTypesIOS | |||
. Transforms | |||
backfaceVisibility | oneOf visible , hidden | ||
backgroundColor | ColorPropType | ||
borderBottomColor | ColorPropType | ||
borderBottomEndRadius | number | ||
borderBottomStartRadius | number | ||
borderBottomLeftRadius | number | ||
borderBottomRightRadius | number | ||
borderBottomWidth | number | ||
borderColor | ColorPropType | ||
borderEndColor | ColorPropType | ||
borderStartColor | ColorPropType | ||
borderLeftColor | ColorPropType | ||
borderLeftWidth | number | ||
borderRadius | number | ||
borderRightColor | ColorPropType | ||
borderRightWidth | number | ||
borderStyle | oneOf solid , dotted , dashed | ||
borderTopColor | ColorPropType | ||
borderTopEndRadius | number | ||
borderTopStartRadius | number | ||
borderTopLeftRadius | number | ||
borderTopRightRadius | number | ||
borderTopWidth | number | ||
borderWidth | number | ||
opacity | number | ||
overflow | oneOf visible , hidden | ||
elevation | number | android | (Android-only) Sets the elevation of a view, using Android’s underlying elevation API. This adds a drop shadow to the item and affects z-order for overlapping views. Only supported on Android 5.0+, has no effect on earlier versions. |
[Solved]-React Native :after styling like css-React Native
Css pseudo classes do not work in react-native, but if you want your styles to look as close to css as possible I would recommend using something like Styled Components. It works on both web and react-native.
Funk Soul Ninja 1819
You can easily create pseudo classes using Styled Components
import styled from "styled-components"; import theme from "./theme"; export const HoverLinedLink = styled.div` a < position: relative; padding: 10px 0px; margin: 0px 15px; color: #fff; font-weight: bold; >a:hover < text-decoration: none; >a:after < content: ""; position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; width: 0; height: 3px; background: '#d00; // Red transition: 250ms; >a:hover:after < width: 100%; >`;
Related Query
- React Native :after styling like css
- React Native styling with conditional
- React Native AsyncStorage fetches data after rendering
- React native text like span
- Getting «verifyReleaseResources» error after upgrading React Native
- React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5
- React Native pseudo leaking memory after remove elements from screen (ios)
- Getting library «libjsc.so» not found after upgrading React Native to 0.60-RC2
- React Native app opens and closes quickly after installation on ios simulator
- Unable to build react native project after updating to xcode 11.0
- React Native ScrollView snapping back to top after release
- React Native with Typescript and Jest is broken after 0.57 Update: Couldn’t find preset «module:metro-react-native-babel-preset» relative to directory
- How to Remove White Screen after Splash Screen in React Native For Android
- React Native — How to detect font size after a font scaling?
- React Native — how to scroll a ScrollView to a given location after navigation from another screen
- react native fetch returns Blob instead of JSON after upgrading to 0.24.1
- How to set `ImageBackground` image position in react native. Like in css `background-postion: bottom`?
- React Native — Android — FCM — Display group notification like What’s app also allowing multiple grouped notifications
- React Native ListView row not re-rendering after state change
- React Native Picker Styling — ANDROID
- React Native — Null pointer dereference after navigating to/from a page containing multiple tweets embedded inside their own WebViews
- React Native App no longer builds after upgrading to XCode12.5
- Background image disappears after navigating back and forth several times React native
- React Native Change Page after 5 seconds
- Metro Builder: SyntaxError: Unexpected token = after upgrading to React Native 0.65.1
- Error: Element type is invalid: expected a string or a class/function but got: undefined after upgrade of React Native
- react native animated flatlist item after item
- nothing happens after react-native run-ios —device in react native
- RNFirebaseNotifications.h not found after migrating to firebase v6. React Native
- React Native — How to do Blur View like iOS or instagram?
More Query from same tag
- React Native LayoutAnimation scale doesn’t work on android
- How to add title in header title in tab navigation?
- FlatList onPress to different screen with data
- iOS: font sizes in a React Native view do not match iOS native font sizes
- how to create Dynamic pickers inside loop in react-native?
- React Native TypeScript TextInput not working
- Invalid hook call. Hooks can only be called inside of the body of a function component. in react native signature canvas
- Passing state from parent to child to child
- undefined is not a function (evaluating ‘decorator(target, property, desc)’)
- React-native on 64-bit devices — debug works fine but not release. No problem with 32-bit devices at all
- Move to another screen when FlatList item in pressed, as of now I print key value in pressHandler()
- Avoid rerendering of FlatList row
- How to do validate full name in JS in React Native
- Array of unique objects in react native
- How to add drawer to existing Screen in React Native
- react native render native custom view
- ViewManager receiveCommand is deprecated?
- How to stack cards with position absolute?
- Using Overmind DevTools with React Native
- How to import fuse.js into a react native project, getting an error
- How to hide some items from DrawerNavigator. I want that only a few appear
- libvlc android video size does not fit the surfaceview
- java.lang.ClassNotFoundException: Didn’t find class «eduapp.arg.MainApplication» on path: DexPathList
- force component to re-render after redux state change
- Why can’t I change the color of the status bar?
- How can I resolve the error «the expected type comes from property ‘component’ which is declared here on type»?
- Vertical text in react native is cut by it’s original height (using transform)
- State not being set properly — React Native
- Dispatching an imported function in React Native Redux
- How to add multiple image using react native image picker