Style Functions
Style Functions in Pearl UI are a collection of predefined functions that are utilized by the useStyleProps hook. These functions enable the addition of style props to any React Native element and link specific style properties to the values in the active theme object, facilitating a design-system-driven development experience.
Here is a list of the style functions supported in Pearl UI:
#
Collections of Style FunctionsPearl UI offers a collection of commonly used style functions.
#
Box Style FunctionsThese are the style functions used to construct the Box component. The collection includes the following style functions:
import { boxStyleFunctions } from "pearl-ui";
#
Text Style FunctionsThese are the style functions used to construct the Text component. The collection includes the following style functions:
import { textStyleFunctions } from "pearl-ui";
#
All FunctionsThis is a collection of all the style functions offered in Pearl UI.
import { allStyleFunctions } from "pearl-ui";
#
Individual Style FunctionsEach style function in Pearl UI is designed to convert specific style props to React Native styles. Here are the individual style functions:
#
Background ColorThe backgroundColorStyleFunction converts all the backgroundColor style props to React Native styles.
import { backgroundColorStyleFunction } from "pearl-ui";
#
ColorThe colorStyleFunction converts all the color style props to React Native styles.
import { colorStyleFunction } from "pearl-ui";
#
OpacityThe opacityStyleFunction converts all the opacity style props to React Native styles.
import { opacityStyleFunction } from "pearl-ui";
#
VisibilityThe visibleStyleFunction converts all the visible style props to React Native styles.
import { visibleStyleFunction } from "pearl-ui";
#
SpacingThe spacingStyleFunction converts all the spacing style props to React Native styles.
import { spacingStyleFunction } from "pearl-ui";
#
TypographyThe typographyStyleFunction converts all the typography style props to React Native styles.
import { typographyStyleFunction } from "pearl-ui";
#
LayoutThe layoutStyleFunction converts all the layout style props to React Native styles.
import { layoutStyleFunction } from "pearl-ui";
#
TransformThe transformStyleFunction converts all the transform style props to React Native styles.
import { transformStyleFunction } from "pearl-ui";
#
PositionThe positionStyleFunction converts all the position style props to React Native styles.
import { positionStyleFunction } from "pearl-ui";
#
BorderThe borderStyleFunction converts all the border style props to React Native styles.
import { borderStyleFunction } from "pearl-ui";
#
ShadowThe shadowStyleFunction converts all the shadow style props to React Native styles.
import { shadowStyleFunction } from "pearl-ui";
#
Text ShadowThe textShadowStyleFunction converts all the textShadow style props to React Native styles.
import { textShadowStyleFunction } from "pearl-ui";