Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Inline component for Stripe Apps


Inline component for Stripe Apps

The inline component is used to style inline content such as text.

SDK version

To add the Inline component to your app:

Inline components are styleable inline elements, equivalent to a span in HTML. They support custom styles. If you’d like to render or style block-level elements, see the Box component.

Loading example...

<Inline
 css={{
 font: 'body',
 fontWeight: 'semibold',
 color: 'success',
 marginY: 'large',
 }}
>
 This is an example of the inline component.
</Inline>

Inline props

PropertyType
childrenRequired React.ReactNode The contents of the component.
cssOptional CSS | undefined Related types: CSS.

CSS

PropertyType
alignSelfXOptional ("start" | "center" | "end" | "stretch") | undefined Horizontal alignment. See Layout properties for details.
alignSelfYOptional ("top" | "center" | "baseline" | "bottom" | "stretch") | undefined Vertical alignment. See Layout properties for details.
alignXOptional ("start" | "center" | "end" | "stretch") | undefined Horizontal alignment. See Layout properties for details.
alignYOptional ("top" | "center" | "baseline" | "bottom" | "stretch") | undefined Vertical alignment. See Layout properties for details.
backgroundColorOptional ("container" | "surface") | undefined
bleedOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedBottomOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedLeftOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedRightOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedTopOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedXOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
bleedYOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
borderBottomColorOptional ("neutral" | "critical") | undefined
borderBottomLeftRadiusOptional ("none" | "xsmall" | "small" | "medium" | "large" | "rounded") | undefined
borderBottomRightRadiusOptional ("none" | "xsmall" | "small" | "medium" | "large" | "rounded") | undefined
borderBottomStyleOptional ("dashed" | "dotted" | "double" | "groove" | "hidden" | "inherit" | "initial" | "inset" | "none" | "outset" | "revert-layer" | "revert" | "ridge" | "solid" | "unset") | undefined
borderBottomWidthOptional number | undefined The width of the border.
borderColorOptional ("neutral" | "critical") | undefined
borderLeftColorOptional ("neutral" | "critical") | undefined
borderLeftStyleOptional ("dashed" | "dotted" | "double" | "groove" | "hidden" | "inherit" | "initial" | "inset" | "none" | "outset" | "revert-layer" | "revert" | "ridge" | "solid" | "unset") | undefined
borderLeftWidthOptional number | undefined The width of the border.
borderRadiusOptional ("none" | "xsmall" | "small" | "medium" | "large" | "rounded") | undefined
borderRightColorOptional ("neutral" | "critical") | undefined
borderRightStyleOptional ("dashed" | "dotted" | "double" | "groove" | "hidden" | "inherit" | "initial" | "inset" | "none" | "outset" | "revert-layer" | "revert" | "ridge" | "solid" | "unset") | undefined
borderRightWidthOptional number | undefined The width of the border.
borderStyleOptional ("dashed" | "dotted" | "double" | "groove" | "hidden" | "inherit" | "initial" | "inset" | "none" | "outset" | "revert-layer" | "revert" | "ridge" | "solid" | "unset") | undefined
borderTopColorOptional ("neutral" | "critical") | undefined
borderTopLeftRadiusOptional ("none" | "xsmall" | "small" | "medium" | "large" | "rounded") | undefined
borderTopRightRadiusOptional ("none" | "xsmall" | "small" | "medium" | "large" | "rounded") | undefined
borderTopStyleOptional ("dashed" | "dotted" | "double" | "groove" | "hidden" | "inherit" | "initial" | "inset" | "none" | "outset" | "revert-layer" | "revert" | "ridge" | "solid" | "unset") | undefined
borderTopWidthOptional number | undefined The width of the border.
borderWidthOptional number | undefined The width of the border.
bottomOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
boxShadowOptional ("none" | "base" | "top" | "hover" | "focus") | undefined
colorOptional ("brand" | "primary" | "secondary" | "disabled" | "info" | "success" | "attention" | "critical") | undefined
columnGapOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
displayOptional "grid" | undefined
distributeOptional ("packed" | "space-between") | undefined
fillOptional ("brand" | "primary" | "secondary" | "disabled" | "info" | "success" | "attention" | "critical") | undefined
focusRingOptional ("none" | "base" | "top" | "hover" | "focus") | undefined
fontOptional ("body" | "bodyEmphasized" | "caption" | "heading" | "kicker" | "lead" | "subheading" | "subtitle" | "title") | undefined
fontFamilyOptional ("monospace" | "ui") | undefined
fontWeightOptional ("regular" | "semibold" | "bold") | undefined
gapOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
gapXOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
gapYOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
gridColumnsOptional number | undefined
heightOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The height of the component. See Sizing for details.
insetOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
keylineOptional ("neutral" | "critical") | undefined
leftOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginBottomOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginLeftOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginRightOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginTopOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginXOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
marginYOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
maxHeightOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The height of the component. See Sizing for details.
maxWidthOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The width of the component. See Sizing for details.
minHeightOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The height of the component. See Sizing for details.
minTileWidthOptional (number | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined
minWidthOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The width of the component. See Sizing for details.
overflowOptional ("visible" | "hidden" | "clip" | "scroll" | "auto") | undefined
overflowWrapOptional ("break-word" | "normal") | undefined
overflowXOptional ("visible" | "hidden" | "clip" | "scroll" | "auto") | undefined
overflowYOptional ("visible" | "hidden" | "clip" | "scroll" | "auto") | undefined
paddingOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingBottomOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingLeftOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingRightOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingTopOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingXOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
paddingYOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
rowGapOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
stackOptional ("x" | "y" | "z") | undefined
textAlignOptional ("center" | "end" | "justify" | "left" | "match-parent" | "right" | "start") | undefined
textOverflowOptional "ellipsis" | undefined
textTransformOptional ("capitalize" | "uppercase" | "lowercase" | "none" | "full-width" | "full-size-kana") | undefined
topOptional (number | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge") | undefined
topShadowOptional ("none" | "base" | "top" | "hover" | "focus") | undefined
whiteSpaceOptional ("normal" | "nowrap" | "pre" | "pre-wrap" | "pre-line" | "break-spaces") | undefined
widthOptional (number | "auto" | "fill" | "min" | "max" | "fit" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12") | undefined The width of the component. See Sizing for details.
wordBreakOptional ("normal" | "break-all" | "keep-all" | "break-word") | undefined
wordWrapOptional ("break-word" | "normal") | undefined
wrapOptional ("wrap" | "nowrap" | "wrap-reverse") | undefined
zIndexOptional ("overlay" | "partial") | undefined
backgroundOptional Deprecated Use the backgroundColor property instead. ("container" | "surface") | undefined
isolatedDependenciesOptional Deprecated string[] | undefined
layoutOptional Deprecated Use the stack property instead. ("column" | "inline" | "row" | "inline-column" | "inline-row") | undefined
whenOptional Deprecated Use nested styles instead. (string | { pointer: "none" | "coarse" | "fine"; colorScheme: "dark" | "light"; motion: "supported" | "reduced"; hover: "none" | "hover"; viewportWidth: "small" | "medium" | "large" | "xlarge"; contrast: "more" | "less"; }[] | { pointer: "none" | "coarse" | "fine"; colorScheme: "dark" | "light"; motion: "supported" | "reduced"; hover: "none" | "hover"; viewportWidth: "small" | "medium" | "large" | "xlarge"; contrast: "more" | "less"; }) | undefined

Emphasized text

Loading example...

<Inline css={{font: 'body', color: 'primary', fontWeight: 'semibold'}}>
 This text is emphasized
</Inline>

Secondary text

Loading example...

<Inline css={{font: 'caption', color: 'secondary'}}>
 This text is styled using the caption text style and the secondary color.
</Inline>

Custom CSS

The Inline component supports custom styles. This example demonstrates usage of the boxShadow property.

Loading example...

<Box css={{stack: 'y', gap: 'large'}}>
 {['boxShadow', 'topShadow', 'focusRing'].map((shadowProp) => {
 return (
 <Box css={{stack: 'y', gap: 'medium'}} key={shadowProp}>
 <Box css={{font: 'heading', fontFamily: 'monospace'}}>
 {shadowProp}
 </Box>
 {['base', 'hover', 'focus', 'top'].map((shadowValue) => (
 <Box key={[shadowProp, shadowValue].join('-')} css={{stack: 'x'}}>
 <Inline
 css={{
 font: 'body',
 padding: 'large',
 fontFamily: 'monospace',
 [shadowProp]: shadowValue,
 }}
 >
 {shadowProp}={shadowValue}
 </Inline>
 </Box>
 ))}
 </Box>
 );
 })}
</Box>

See also

Last verified 2026-09-24

Is this helpful?