Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kristerkari/react-native-known-styling-properties
List of React Native specific styling properties.
https://github.com/kristerkari/react-native-known-styling-properties
css properties react-native style styled-components stylesheet
Last synced: about 1 month ago
JSON representation
List of React Native specific styling properties.
- Host: GitHub
- URL: https://github.com/kristerkari/react-native-known-styling-properties
- Owner: kristerkari
- License: mit
- Created: 2018-02-10T15:13:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T18:03:29.000Z (2 months ago)
- Last Synced: 2024-12-16T06:12:14.132Z (about 2 months ago)
- Topics: css, properties, react-native, style, styled-components, stylesheet
- Language: JavaScript
- Size: 983 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native styling properties
[![NPM version](https://img.shields.io/npm/v/react-native-known-styling-properties.svg)](https://www.npmjs.com/package/react-native-known-styling-properties)
[![Build Status](https://github.com/kristerkari/react-native-known-styling-properties/workflows/Tests/badge.svg)](https://github.com/kristerkari/react-native-known-styling-properties/actions?workflow=Tests)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)List of known React Native specific styling properties.
Sources for supported properties:
- [React Native repo](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts)
- [react-native-styling-cheat-sheet](https://github.com/vhpoet/react-native-styling-cheat-sheet)
- [css-to-react-native tests](https://github.com/styled-components/css-to-react-native/tree/master/src/__tests__)## Install
```sh
yarn add react-native-known-styling-properties --dev
```or
```sh
npm install react-native-known-styling-properties --save-dev
```## API
To get list of all styling properties supported by React Native:
```js
import { allProps } from "react-native-known-styling-properties";
```To get list of all styling properties supported by [css-to-react-native](https://github.com/styled-components/css-to-react-native):
```js
import { allCSS2RNProps } from "react-native-known-styling-properties";
```The result is an array of supported styling properties:
```js
allProps = [
"alignItems",
"alignSelf",
"flex",
"flexDirection",
"flexWrap",
...
]
```