Accepted values for View Component.

Note that some properties are inherited from other sets.

Here's an example using some of the properties:

Hierarchy

Properties

alignContent? alignItems? alignSelf? backgroundAttachment? backgroundBlendMode? backgroundClip? backgroundColor? backgroundImage? backgroundOrigin? backgroundPosition? backgroundPositionX? backgroundPositionY? backgroundRepeat? backgroundSize? basis? border? borderBottomStyle? borderBottomWidth? borderColor? borderLeftStyle? borderLeftWidth? borderRadius? borderRadiusLeftBottom? borderRadiusLeftTop? borderRadiusRightBottom? borderRadiusRightTop? borderRightStyle? borderRightWidth? borderStyle? borderTopStyle? borderTopWidth? borderWidth? bottom? bottomInset? boxShadow? color? containerRef? contentColor? customColor? direction? display? elevation? filter? flexNone? flexWrap? gap? grow? height? id? justifyContent? justifyItems? justifySelf? left? margin? marginBottom? marginHorizontal? marginLeft? marginRight? marginTop? marginVertical? maxHeight? maxWidth? minHeight? minWidth? mixBlendMode? mode? objectFit? onScroll? opacity? order? overflow? overflowX? overflowY? padding? paddingBottom? paddingHorizontal? paddingLeft? paddingRight? paddingTop? paddingVertical? position? right? scrollBehavior? scrollMargin? scrollMarginBlock? scrollMarginBlockEnd? scrollMarginBlockStart? scrollMarginBottom? scrollMarginInline? scrollMarginInlineEnd? scrollMarginInlineStart? scrollMarginLeft? scrollMarginRight? scrollMarginTop? scrollPadding? scrollPaddingBlock? scrollPaddingBlockEnd? scrollPaddingBlockStart? scrollPaddingBottom? scrollPaddingInline? scrollPaddingInlineEnd? scrollPaddingInlineStart? scrollPaddingLeft? scrollPaddingRight? scrollPaddingTop? scrollSnapAlign? scrollSnapStop? scrollSnapType? sendFocusToInput? showScrollbars? shrink? top? topInset? transform? transition? visibility? visualState? width? zIndex?

Properties

alignContent?: "center" | "start" | "end" | "between" | "around"

Content alignment through the element axis

Example:

  <alignContent="center" />
alignItems?: "center" | "start" | "end" | "between" | "around"

Item alignment through the element axis

Example:

  <alignItems="center" />
alignSelf?: "center" | "start" | "end" | "between" | "around"

Self alignment through the element axis

Example:

  <alignSelf="center" />
backgroundAttachment?: "scroll" | "fixed" | "local" | "none"

backgroundAttachment defines how a background image behaves in relation to the scrolling of content on the page.

Param

The option for attaching the background image.

  • "scroll": The background image scrolls with the content when the user scrolls the page.
  • "fixed": The background image remains fixed relative to the viewport and does not move when the user scrolls the page.
  • "local": The background image scrolls with the content of a specific element, such as a div.

Example:

   <backgroundAttachment="scrooll" />
backgroundBlendMode?: "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"

Defines how background layers blend with each other. It applies blending effects between multiple background images, gradients, or colors within the same element.

Example:

   <View backgroundBlendMode="multiply" />
backgroundClip?: "border-box" | "padding-box" | "content-box" | "text"

The background clip area.

Example:

   <backgroundClip="border-box" />
backgroundColor?: string

Background color of component

Check the token table to know which values to use

Example:

   <backgroundColor="background-color" />
backgroundImage?: any

Change the background Image

Example:

   <backgroundImage="myBoxShadow" />
backgroundOrigin?: "border-box" | "padding-box" | "content-box"

Sets the origin of background positioning

Example:

   <backgroundOrigin="border-box" />
backgroundPosition?: string

The position of background

Example:

   <backgroundPosition="center" />
backgroundPositionX?: string

The horizontal position of background

Example:

   <backgroundPositionX="center" />
backgroundPositionY?: string

The vertical position of background

Example:

   <backgroundPositionY="center" />
backgroundRepeat?: "repeat" | "space" | "round" | "no-repeat" | "repeat-x" | "repeat-y"

Allows background repetition

Example:

   <backgroundRepeat="repeat" />
backgroundSize?: "cover" | "contain" | "auto"

Sets the background sizing

Example:

   <backgroundSize="cover" />
basis?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Controls grow and shrink in one index

Example:

  <basis={1} />
border?: string

borderColor sets the color of borders in the design system, allowing you to control the visual appearance of elements' outlines.

Check the token table to know which values to use

Example:

   <borderColor="neutral-900" />
borderBottomStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderBottomWidth?: string

borderBottomWidth focuses on adjusting the thickness of the bottom border in the design system, allowing you to fine-tune the visual appearance of the bottom border for elements.

Check the token table to know which values to use

Example:

   <borderBottomWidth="hairline" />
borderColor?: string

Border Color of component

Check the token table to know which values to use

Example:

   <borderColor="neutral-900" />
borderLeftStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderLeftWidth?: string

borderBottomWidth is used to control the thickness of the bottom border in the design system, giving you control over the visual appearance of the bottom edges of elements.

Check the token table to know which values to use

Example:

   <borderBottomWidth="hairline" />
borderRadius?: string

borderRadius defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadius="micro" />
borderRadiusLeftBottom?: string

borderRadiusLeftBottom defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusLeftBottom="micro" />
borderRadiusLeftTop?: string

borderRadiusLeftTop defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusLeftTop="micro" />
borderRadiusRightBottom?: string

borderRadiusRightBottom defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusRightBottom="micro" />
borderRadiusRightTop?: string

borderRadiusRightTop defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusRightTop="micro" />
borderRightStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderRightWidth?: string

borderRightWidth is used to control the thickness of the right border in the design system, giving you control over the visual appearance of the right edges of elements.

Check the token table to know which values to use

Example:

   <borderRightWidth="hairline" />
borderStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderTopStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderTopWidth?: string

borderTopWidth specifically adjusts the thickness of the top border in the design system, giving you precise control over the visual aspect of the top border of elements.

Check the token table to know which values to use

Example:

   <borderTopWidth="hairline" />
borderWidth?: string

The borderWidth determines the thickness of borders in the design system. It's a crucial property for defining the visual weight of elements.

Check the token table to know which values to use

Example:

   <borderWidth="hairline" />
bottom?: string | number

A distance from the bottom.

Example:

  <bottom={20} />
bottomInset?: boolean

It makes the element have the exact size of the bottom bar of the phone (which contains the gesture bar) to separate the content above it.

Example:

 <View bottomInset={true}>
boxShadow?: string

Efeito de sombra

Example:

  <boxShadow="myBoxShadow" />

Deprecated

color?: string

Text color of components

Check the token table to know which values to use

Example:

   <color="neutral-900" />
containerRef?: any

Root element ref of the component

contentColor?: boolean

"Use contrast colors for text and background"

Example:

 <View contentColors backgroundColor="primary-500" />
customColor?: string

This property is used to specify a color, whether in hexadecimal or RGB format.

Example:

<View customColor="#d844ec">
<Text>View com background em hexadecimal</Text>
<Input />
</View>
direction?: "row" | "column" | "row-reverse" | "column-reverse"

Direction of the FlexBox axis

Example:

   <direction="row" />
display?: "none" | "block" | "flex" | "inline" | "inline-block" | "inline-flex"

Changes the element exhibition

Example:

<display="flex"/>
elevation?: "none" | "low" | "medium" | "high" | "highest"

Adjust elevation of component

Example:

  <View elevation="low" ></View>
filter?: string

Sets a filter to image render.

Example:

<Image filter="sepia(60%)" />
flexNone?: boolean

Annulate flex properties

Example:

  <flexNone={true} />
flexWrap?: "nowrap" | "wrap" | "reverse"

Activate content wrapping

Example:

  <flexWrap="wrap" />
gap?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Changes the gap between elements

Example:

  <gap={1} />
grow?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Growth ratio of element

Example:

  <grow={1} />
height?: string | number

Adjust component height

Example:

   <height={100} />
id?: string

"Fills the ID of the element (not very practical)."

Example:

 <View id="id" />
justifyContent?: "center" | "start" | "end" | "between" | "around" | "evenly"

Content distribution through the element axis

Example:

  <justifyContent="center" />
justifyItems?: "center" | "start" | "end" | "between" | "around"

Item distribution through the element axis

Example:

  <JustifyItems="center" />
justifySelf?: "center" | "start" | "end" | "between" | "around"

Self distribution through the element axis

Example:

  <justifySelf="center" />
left?: string | number

A distance from the left.

Example:

  <left={20} />
margin?: string

General margin size

Check the token table to know which values to use

Example:

<margin="quark" />
marginBottom?: string

Bottom margin size

Check the token table to know which values to use

Example:

<marginBottom="quark" />
marginHorizontal?: string

Horizontal (left and right) margin size

Check the token table to know which values to use

Example:

<marginHorizontal="quark" />
marginLeft?: string

Left margin size

Check the token table to know which values to use

Example:

<marginLeft="quark" />
marginRight?: string

Right margin size

Check the token table to know which values to use

Example:

<marginRight="quark" />
marginTop?: string

Top margin size

Check the token table to know which values to use

Example:

<marginTop="quark" />
marginVertical?: string

Vertical (top and bottom) margin size

Check the token table to know which values to use

Example:

<marginVertical="quark" />
maxHeight?: string | number

Adjust component maximum height

Example:

   <maxHeight={100} />
maxWidth?: string | number

Adjust component maximum width

Example:

   <maxwidth={100} />
minHeight?: string | number

Adjust component minimum height

Example:

   <minHeight={100} />
minWidth?: string | number

Adjust component minimum width

Example:

   <minWidth={100} />
mixBlendMode?: "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"

Determines how an element’s content blends with the background or elements behind it. It affects the entire element, including text and images, and creates effects similar to those in graphic design software.

Example:

   <View mixBlendMode="screen" />
mode?: "skeleton"

Setup a skeleton on this view

Example:

<View mode="skeleton" width={50} height={50} />
objectFit?: "none" | "cover" | "contain" | "fill" | "scale-down"

Sets the object fit

Example:

   <objectFit="cover" />
onScroll?: ((e) => void)

Type declaration

    • (e): void
    • Callback function to be executed when the user scrolls the view

      The function receives an object by argument with the following properties:

      • onViewport: boolean, indicates if the element is in the viewport

      Example:

      <View onScroll={(e) => console.log(e)} />
      

      Parameters

      • e: any

      Returns void

opacity?: "none" | "solid" | "light" | "half" | "heavy" | "transparent"

Changes the element opacity

Example:

<opacity="light" />
order?: number

Changes the order of elements

Example:

  <order="center" />
overflow?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The overall overflow behavior.

Example:

  <overflow="hidden" />
overflowX?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The horizontal overflow behavior.

Example:

  <overflowX="hidden" />
overflowY?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The vertical overflow behavior.

Example:

  <overflowY="hidden" />
padding?: string

General padding size

Check the token table to know which values to use

Example:

<padding="quark" />
paddingBottom?: string

Bottom padding size

Check the token table to know which values to use

Example:

<paddingBottom="quark" />
paddingHorizontal?: string

Horizontal (left and right) padding size

Check the token table to know which values to use

Example:

<paddingHorizontal="quark" />
paddingLeft?: string

Left padding size

Check the token table to know which values to use

Example:

<paddingLeft="quark" />
paddingRight?: string

Right padding size

Check the token table to know which values to use

Example:

<paddingRight="quark" />
paddingTop?: string

Top padding size

Check the token table to know which values to use

Example:

<paddingTop="quark" />
paddingVertical?: string

Vertical (top and bottom) padding size

Check the token table to know which values to use

Example:

<paddingVertical="quark" />
position?: "fixed" | "static" | "relative" | "absolute" | "sticky"

The element positioning.

Example:

  <position="relative" />
right?: string | number

A distance from the right.

Example:

  <right={20} />
scrollBehavior?: "auto" | "smooth"

Sets the behavior for a scrolling box when scrolling is triggered by the navigation.

scrollMargin?: string | number

Sets the scroll margin.

scrollMarginBlock?: string | number

Sets the scroll margin on the block.

scrollMarginBlockEnd?: string | number

Sets the scroll margin at the end of the block.

scrollMarginBlockStart?: string | number

Sets the scroll margin at the start of the block.

scrollMarginBottom?: string | number

Sets the scroll margin at the bottom.

scrollMarginInline?: string | number

Sets the scroll margin on the inline.

scrollMarginInlineEnd?: string | number

Sets the scroll margin at the end of the inline.

scrollMarginInlineStart?: string | number

Sets the scroll margin at the start of the inline.

scrollMarginLeft?: string | number

Sets the scroll margin on the left.

scrollMarginRight?: string | number

Sets the scroll margin on the right.

scrollMarginTop?: string | number

Sets the scroll margin at the top.

scrollPadding?: string | number

Sets the scroll padding.

scrollPaddingBlock?: string | number

Sets the scroll padding on the block.

scrollPaddingBlockEnd?: string | number

Sets the scroll padding at the end of the block.

scrollPaddingBlockStart?: string | number

Sets the scroll padding at the start of the block.

scrollPaddingBottom?: string | number

Sets the scroll padding at the bottom.

scrollPaddingInline?: string | number

Sets the scroll padding on the inline.

scrollPaddingInlineEnd?: string | number

Sets the scroll padding at the end of the inline.

scrollPaddingInlineStart?: string | number

Sets the scroll padding at the start of the inline.

scrollPaddingLeft?: string | number

Sets the scroll padding on the left.

scrollPaddingRight?: string | number

Sets the scroll padding on the right.

scrollPaddingTop?: string | number

Sets the scroll padding at the top.

scrollSnapAlign?: "center" | "start" | "end"

Sets the alignment of scroll snap.

scrollSnapStop?: "normal" | "always"

Sets the scroll snap to stop normally or always.

scrollSnapType?: "none" | "block" | "inline" | "both" | "x mandatory" | "x proximity" | "y mandatory" | "y proximity" | "both mandatory" | "both proximity"

Sets the type of scroll snap.

sendFocusToInput?: boolean

This option should be used when there is a form component; it triggers focus on the contained form component when you touch the entire element.

Example:

<View sendFocusToInput>
<Text>Acima de um input</Text>
<Input />
</View>
showScrollbars?: boolean

This property controls the display of scrollbars.

<View showScrollbars>
</View>
shrink?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Shrink ratio of element

Example:

  <shrink={1} />
top?: string | number

A distance from the top.

Example:

  <top={20} />
topInset?: boolean

It makes the element have the exact size of the top bar of the phone (which contains the camera, clock, and notifications) to separate the content below it.

Example:

 <View topInset={true}>
transform?: string

"Prepare a position transforming of element"

Example:

 <View transform="rotate(45deg)" />
transition?: string

"Prepare a transition of visual state change"

Example:

 <View transition="background-color 0.5s ease-in-out" />
visibility?: "hidden" | "visible" | "collapse"

Changes the element visibility

Example:

<visibility="visible" />
visualState?: "success" | "danger" | "warning"

"Determines the visual state of the component and its children."

Example:

 <View visualState="success" />
width?: string | number

Adjust component width

Example:

   <width={100} />
zIndex?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Value of z-index

Example:

  <zIndex={1} />