Skip to main content

Style Functions

Style Functions are a set of pre-defined functions used by the useStyledProps to add support for style props to any React Native element. They also connect specific style properties to the values in the active theme object for a design-system-driven development experience.

The following list of style functions are supported in Pearl UI:

Spacing#

The spacing style function converts all the spacing style props to React Native styles.

import { spacing } from "pearl-ui";

Typography#

The typography style function converts all the typography style props to React Native styles.

import { typography } from "pearl-ui";

Layout#

The layout style function converts all the layout style props to React Native styles.

import { layout } from "pearl-ui";

Position#

The position style function converts all the position style props to React Native styles.

import { position } from "pearl-ui";

Border#

The border style function converts all the border style props to React Native styles.

import { border } from "pearl-ui";

Shadow#

The shadow style function converts all the shadow style props to React Native styles.

import { shadow } from "pearl-ui";

Text Shadow#

The textShadow style function converts all the textShadow style props to React Native styles.

import { textShadow } from "pearl-ui";