Interface ViewStyle

interface ViewStyle {
    alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around";
    alignItems?: FlexAlignType;
    alignSelf?: "auto" | FlexAlignType;
    aspectRatio?: string | number;
    backfaceVisibility?: "visible" | "hidden";
    backgroundColor?: ColorValue;
    borderBlockColor?: ColorValue;
    borderBlockEndColor?: ColorValue;
    borderBlockStartColor?: ColorValue;
    borderBottomColor?: ColorValue;
    borderBottomEndRadius?: AnimatableNumericValue;
    borderBottomLeftRadius?: AnimatableNumericValue;
    borderBottomRightRadius?: AnimatableNumericValue;
    borderBottomStartRadius?: AnimatableNumericValue;
    borderBottomWidth?: number;
    borderColor?: ColorValue;
    borderCurve?: "circular" | "continuous";
    borderEndColor?: ColorValue;
    borderEndEndRadius?: AnimatableNumericValue;
    borderEndStartRadius?: AnimatableNumericValue;
    borderEndWidth?: number;
    borderLeftColor?: ColorValue;
    borderLeftWidth?: number;
    borderRadius?: AnimatableNumericValue;
    borderRightColor?: ColorValue;
    borderRightWidth?: number;
    borderStartColor?: ColorValue;
    borderStartEndRadius?: AnimatableNumericValue;
    borderStartStartRadius?: AnimatableNumericValue;
    borderStartWidth?: number;
    borderStyle?: "solid" | "dotted" | "dashed";
    borderTopColor?: ColorValue;
    borderTopEndRadius?: AnimatableNumericValue;
    borderTopLeftRadius?: AnimatableNumericValue;
    borderTopRightRadius?: AnimatableNumericValue;
    borderTopStartRadius?: AnimatableNumericValue;
    borderTopWidth?: number;
    borderWidth?: number;
    bottom?: DimensionValue;
    columnGap?: number;
    direction?: "inherit" | "ltr" | "rtl";
    display?: "none" | "flex";
    elevation?: number;
    end?: DimensionValue;
    flex?: number;
    flexBasis?: DimensionValue;
    flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
    flexGrow?: number;
    flexShrink?: number;
    flexWrap?: "wrap" | "nowrap" | "wrap-reverse";
    gap?: number;
    height?: DimensionValue;
    inset?: DimensionValue;
    insetBlock?: DimensionValue;
    insetBlockEnd?: DimensionValue;
    insetBlockStart?: DimensionValue;
    insetInline?: DimensionValue;
    insetInlineEnd?: DimensionValue;
    insetInlineStart?: DimensionValue;
    justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
    left?: DimensionValue;
    margin?: DimensionValue;
    marginBlock?: DimensionValue;
    marginBlockEnd?: DimensionValue;
    marginBlockStart?: DimensionValue;
    marginBottom?: DimensionValue;
    marginEnd?: DimensionValue;
    marginHorizontal?: DimensionValue;
    marginInline?: DimensionValue;
    marginInlineEnd?: DimensionValue;
    marginInlineStart?: DimensionValue;
    marginLeft?: DimensionValue;
    marginRight?: DimensionValue;
    marginStart?: DimensionValue;
    marginTop?: DimensionValue;
    marginVertical?: DimensionValue;
    maxHeight?: DimensionValue;
    maxWidth?: DimensionValue;
    minHeight?: DimensionValue;
    minWidth?: DimensionValue;
    opacity?: AnimatableNumericValue;
    overflow?: "visible" | "hidden" | "scroll";
    padding?: DimensionValue;
    paddingBlock?: DimensionValue;
    paddingBlockEnd?: DimensionValue;
    paddingBlockStart?: DimensionValue;
    paddingBottom?: DimensionValue;
    paddingEnd?: DimensionValue;
    paddingHorizontal?: DimensionValue;
    paddingInline?: DimensionValue;
    paddingInlineEnd?: DimensionValue;
    paddingInlineStart?: DimensionValue;
    paddingLeft?: DimensionValue;
    paddingRight?: DimensionValue;
    paddingStart?: DimensionValue;
    paddingTop?: DimensionValue;
    paddingVertical?: DimensionValue;
    pointerEvents?: "none" | "box-none" | "box-only" | "auto";
    position?: "absolute" | "relative";
    right?: DimensionValue;
    rotation?: AnimatableNumericValue;
    rowGap?: number;
    scaleX?: AnimatableNumericValue;
    scaleY?: AnimatableNumericValue;
    shadowColor?: ColorValue;
    shadowOffset?: Readonly<{
        height: number;
        width: number;
    }>;
    shadowOpacity?: AnimatableNumericValue;
    shadowRadius?: number;
    start?: DimensionValue;
    top?: DimensionValue;
    transform?: (PerpectiveTransform | RotateTransform | RotateXTransform | RotateYTransform | RotateZTransform | ScaleTransform | ScaleXTransform | ScaleYTransform | TranslateXTransform | TranslateYTransform | SkewXTransform | SkewYTransform | MatrixTransform)[];
    transformMatrix?: number[];
    translateX?: AnimatableNumericValue;
    translateY?: AnimatableNumericValue;
    width?: DimensionValue;
    zIndex?: number;
}

Hierarchy

  • FlexStyle
  • ShadowStyleIOS
  • TransformsStyle
    • ViewStyle

Properties

alignContent? alignItems? alignSelf? aspectRatio? backfaceVisibility? backgroundColor? borderBlockColor? borderBlockEndColor? borderBlockStartColor? borderBottomColor? borderBottomEndRadius? borderBottomLeftRadius? borderBottomRightRadius? borderBottomStartRadius? borderBottomWidth? borderColor? borderCurve? borderEndColor? borderEndEndRadius? borderEndStartRadius? borderEndWidth? borderLeftColor? borderLeftWidth? borderRadius? borderRightColor? borderRightWidth? borderStartColor? borderStartEndRadius? borderStartStartRadius? borderStartWidth? borderStyle? borderTopColor? borderTopEndRadius? borderTopLeftRadius? borderTopRightRadius? borderTopStartRadius? borderTopWidth? borderWidth? bottom? columnGap? direction? display? elevation? end? flex? flexBasis? flexDirection? flexGrow? flexShrink? flexWrap? gap? height? inset? insetBlock? insetBlockEnd? insetBlockStart? insetInline? insetInlineEnd? insetInlineStart? justifyContent? left? margin? marginBlock? marginBlockEnd? marginBlockStart? marginBottom? marginEnd? marginHorizontal? marginInline? marginInlineEnd? marginInlineStart? marginLeft? marginRight? marginStart? marginTop? marginVertical? maxHeight? maxWidth? minHeight? minWidth? opacity? overflow? padding? paddingBlock? paddingBlockEnd? paddingBlockStart? paddingBottom? paddingEnd? paddingHorizontal? paddingInline? paddingInlineEnd? paddingInlineStart? paddingLeft? paddingRight? paddingStart? paddingTop? paddingVertical? pointerEvents? position? right? rotation? rowGap? scaleX? scaleY? shadowColor? shadowOffset? shadowOpacity? shadowRadius? start? top? transform? transformMatrix? translateX? translateY? width? zIndex?

Properties

alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around"
alignItems?: FlexAlignType
alignSelf?: "auto" | FlexAlignType
aspectRatio?: string | number
backfaceVisibility?: "visible" | "hidden"
backgroundColor?: ColorValue
borderBlockColor?: ColorValue
borderBlockEndColor?: ColorValue
borderBlockStartColor?: ColorValue
borderBottomColor?: ColorValue
borderBottomEndRadius?: AnimatableNumericValue
borderBottomLeftRadius?: AnimatableNumericValue
borderBottomRightRadius?: AnimatableNumericValue
borderBottomStartRadius?: AnimatableNumericValue
borderBottomWidth?: number
borderColor?: ColorValue
borderCurve?: "circular" | "continuous"

On iOS 13+, it is possible to change the corner curve of borders.

Platform

ios

borderEndColor?: ColorValue
borderEndEndRadius?: AnimatableNumericValue
borderEndStartRadius?: AnimatableNumericValue
borderEndWidth?: number
borderLeftColor?: ColorValue
borderLeftWidth?: number
borderRadius?: AnimatableNumericValue
borderRightColor?: ColorValue
borderRightWidth?: number
borderStartColor?: ColorValue
borderStartEndRadius?: AnimatableNumericValue
borderStartStartRadius?: AnimatableNumericValue
borderStartWidth?: number
borderStyle?: "solid" | "dotted" | "dashed"
borderTopColor?: ColorValue
borderTopEndRadius?: AnimatableNumericValue
borderTopLeftRadius?: AnimatableNumericValue
borderTopRightRadius?: AnimatableNumericValue
borderTopStartRadius?: AnimatableNumericValue
borderTopWidth?: number
borderWidth?: number
bottom?: DimensionValue
columnGap?: number
direction?: "inherit" | "ltr" | "rtl"

Platform

ios

display?: "none" | "flex"
elevation?: number

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.

Platform

android

end?: DimensionValue
flex?: number
flexBasis?: DimensionValue
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse"
flexGrow?: number
flexShrink?: number
flexWrap?: "wrap" | "nowrap" | "wrap-reverse"
gap?: number
height?: DimensionValue
inset?: DimensionValue
insetBlock?: DimensionValue
insetBlockEnd?: DimensionValue
insetBlockStart?: DimensionValue
insetInline?: DimensionValue
insetInlineEnd?: DimensionValue
insetInlineStart?: DimensionValue
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly"
left?: DimensionValue
margin?: DimensionValue
marginBlock?: DimensionValue
marginBlockEnd?: DimensionValue
marginBlockStart?: DimensionValue
marginBottom?: DimensionValue
marginEnd?: DimensionValue
marginHorizontal?: DimensionValue
marginInline?: DimensionValue
marginInlineEnd?: DimensionValue
marginInlineStart?: DimensionValue
marginLeft?: DimensionValue
marginRight?: DimensionValue
marginStart?: DimensionValue
marginTop?: DimensionValue
marginVertical?: DimensionValue
maxHeight?: DimensionValue
maxWidth?: DimensionValue
minHeight?: DimensionValue
minWidth?: DimensionValue
opacity?: AnimatableNumericValue
overflow?: "visible" | "hidden" | "scroll"
padding?: DimensionValue
paddingBlock?: DimensionValue
paddingBlockEnd?: DimensionValue
paddingBlockStart?: DimensionValue
paddingBottom?: DimensionValue
paddingEnd?: DimensionValue
paddingHorizontal?: DimensionValue
paddingInline?: DimensionValue
paddingInlineEnd?: DimensionValue
paddingInlineStart?: DimensionValue
paddingLeft?: DimensionValue
paddingRight?: DimensionValue
paddingStart?: DimensionValue
paddingTop?: DimensionValue
paddingVertical?: DimensionValue
pointerEvents?: "none" | "box-none" | "box-only" | "auto"

Controls whether the View can be the target of touch events.

position?: "absolute" | "relative"
right?: DimensionValue
rotation?: AnimatableNumericValue

Deprecated

Use rotate in transform prop instead.

rowGap?: number
scaleX?: AnimatableNumericValue

Deprecated

Use scaleX in transform prop instead.

scaleY?: AnimatableNumericValue

Deprecated

Use scaleY in transform prop instead.

shadowColor?: ColorValue
shadowOffset?: Readonly<{
    height: number;
    width: number;
}>

Type declaration

  • height: number
  • width: number
shadowOpacity?: AnimatableNumericValue
shadowRadius?: number
start?: DimensionValue
top?: DimensionValue
transform?: (PerpectiveTransform | RotateTransform | RotateXTransform | RotateYTransform | RotateZTransform | ScaleTransform | ScaleXTransform | ScaleYTransform | TranslateXTransform | TranslateYTransform | SkewXTransform | SkewYTransform | MatrixTransform)[]
transformMatrix?: number[]

Deprecated

Use matrix in transform prop instead.

translateX?: AnimatableNumericValue

Deprecated

Use translateX in transform prop instead.

translateY?: AnimatableNumericValue

Deprecated

Use translateY in transform prop instead.

width?: DimensionValue
zIndex?: number

Generated using TypeDoc