Style props
Every style property Tamagui accepts, and how each renders per platform
Every styled Tamagui component accepts a universal, web-aligned style API with cross-platform additions that render cleanly on both web and native.
The full types are exported as ViewStyle and TextStyle. For the base set,
see the React Native docs (v3 targets React Native 0.82):
Every value may also be a token, a theme key, or a conditional value.
Cross-platform additions
These render on web and native.
| Prop | Value | Notes |
|---|---|---|
boxShadow | string, object, or array | Accepts theme colors inside the string, such as "0 0 10px shadow-color". |
filter | CSS filter string | brightness and opacity work everywhere, while blur, contrast, and the rest need Android 12+. |
backgroundImage | linear-gradient() or radial-gradient() | Accepts tokens and theme colors. url() is web only. Use ImageBackground on native. |
border | "1px solid border-color" | Expands to width, style, and color per side on native. Native supports one border for all sides. |
outline | "2px solid outline-color" | Expands to outlineWidth, outlineStyle, and outlineColor on native. |
outlineColor, outlineWidth, outlineOffset, outlineStyle | color, space, space, solid, dotted, or dashed | |
textShadow | "2px 2px 4px shadow-color" | Multiple shadows are web only. |
cursor | CSS cursor | Web, and iOS 17+ for trackpad, stylus, and gaze. |
position | absolute, relative, fixed, static, sticky | fixed becomes absolute on native. |
display | flex, none, contents, and the CSS values | |
mixBlendMode | normal, multiply, screen, overlay, and the rest | |
isolation | auto or isolate | |
boxSizing | border-box or content-box |
- Prop
boxShadow- Value
- string, object, or array
- Notes
- Accepts theme colors inside the string, such as
"0 0 10px shadow-color". - Prop
filter- Value
- CSS filter string
- Notes
brightnessandopacitywork everywhere, whileblur,contrast, and the rest need Android 12+.- Prop
backgroundImage- Value
linear-gradient()orradial-gradient()- Notes
- Accepts tokens and theme colors.
url()is web only. UseImageBackgroundon native. - Prop
border- Value
"1px solid border-color"- Notes
- Expands to width, style, and color per side on native. Native supports one border for all sides.
- Prop
outline- Value
"2px solid outline-color"- Notes
- Expands to
outlineWidth,outlineStyle, andoutlineColoron native. - Prop
outlineColor,outlineWidth,outlineOffset,outlineStyle- Value
- color, space, space,
solid,dotted, ordashed - Notes
- Prop
textShadow- Value
"2px 2px 4px shadow-color"- Notes
- Multiple shadows are web only.
- Prop
cursor- Value
- CSS cursor
- Notes
- Web, and iOS 17+ for trackpad, stylus, and gaze.
- Prop
position- Value
absolute,relative,fixed,static,sticky- Notes
fixedbecomesabsoluteon native.- Prop
display- Value
flex,none,contents, and the CSS values- Notes
- Prop
mixBlendMode- Value
normal,multiply,screen,overlay, and the rest- Notes
- Prop
isolation- Value
autoorisolate- Notes
- Prop
boxSizing- Value
border-boxorcontent-box- Notes
Flat transforms
Each of these is a top-level prop that folds into the transform array:
| Prop | Value |
|---|---|
x, y | number |
scale, scaleX, scaleY | number |
rotate, rotateX, rotateY, rotateZ | string such as "45deg" |
skewX, skewY | string |
perspective | number |
matrix | number array |
- Prop
x,y- Value
- number
- Prop
scale,scaleX,scaleY- Value
- number
- Prop
rotate,rotateX,rotateY,rotateZ- Value
- string such as
"45deg" - Prop
skewX,skewY- Value
- string
- Prop
perspective- Value
- number
- Prop
matrix- Value
- number array
Web-only props
These are typed and accepted everywhere, and render only on web:
| Group | Props |
|---|---|
| Background | background, backgroundAttachment, backgroundBlendMode, backgroundClip, backgroundOrigin, backgroundPosition, backgroundRepeat, backgroundSize |
| Borders | borderTop, borderRight, borderBottom, borderLeft, borderImage |
| Masks | mask, maskImage, maskBorder, maskBorderMode, maskBorderOutset, maskBorderRepeat, maskBorderSlice, maskBorderSource, maskBorderWidth, maskClip, maskComposite, maskMode, maskOrigin, maskPosition, maskRepeat, maskSize, maskType |
| Layout | float, overflowBlock, overflowInline, contain, transformStyle |
| Effects | backdropFilter, clipPath |
| Text and input | caretColor, textEmphasis, touchAction |
- Group
- Background
- Props
background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundOrigin,backgroundPosition,backgroundRepeat,backgroundSize- Group
- Borders
- Props
borderTop,borderRight,borderBottom,borderLeft,borderImage- Group
- Masks
- Props
mask,maskImage,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType- Group
- Layout
- Props
float,overflowBlock,overflowInline,contain,transformStyle- Group
- Effects
- Props
backdropFilter,clipPath- Group
- Text and input
- Props
caretColor,textEmphasis,touchAction
Text props
Text components accept the view props above plus the React Native text
styles: color, fontFamily, fontSize, fontStyle, fontWeight,
letterSpacing, lineHeight, textAlign, textDecorationColor,
textDecorationLine, textDecorationStyle, textShadowColor,
textShadowOffset, textShadowRadius, and textTransform.
Font size values
v3 separates raw numbers from exact pixel strings:
fontSize={17} is a platform value and keeps the platform-default line
height. fontSize="17px" passes through as CSS on web and parses to a number
on native. The v5 config pins its font size and lineHeight scales to px
strings so v2 output is preserved.
Variables inside shorthand strings
boxShadow, backgroundImage, filter, border, outline, and
textShadow resolve tokens and theme keys inside the string on both platforms.
borderTop and friends and background do the same on web only.
border
On web the shorthand passes straight through. On native it expands to
borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,
borderStyle, and the four border*Color props. Native supports a single
border for all sides, so use the per-side props for anything else.
outline
On native this expands to outlineWidth, outlineStyle, and outlineColor.
backgroundImage
linear-gradient() and radial-gradient() work on both platforms. url()
is web only, so use ImageBackground for images on native.
textShadow
The individual textShadowColor, textShadowOffset, and textShadowRadius
props also work. Native renders one text shadow.
rem units
rem works on both platforms. Browsers handle it natively, and native
converts it to pixels using PixelRatio.getFontScale(), so it follows the
user’s font size preference:
The base font size defaults to 16 and is set with
settings.remBaseFontSize. On native, 1rem with a base of 16 equals
16 * PixelRatio.getFontScale() pixels.