This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Shape
A Jetpack Compose Shape component for drawing geometric shapes.
Expo UI Shape matches the official Jetpack Compose Shapes API and provides a set of sub-components for drawing geometric shapes such as stars, circles, rectangles, pills, and polygons.


Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic shapes
Render common shapes using the Shape sub-components.
Shapes with rounded corners
Use cornerRounding and smoothing to customize the appearance of shapes.
Polygon and star variants
Use verticesCount and innerRadius to control the shape geometry.
API
import { Shape } from '@expo/ui/jetpack-compose';
Constants
Type: {
Circle: (props: Pick<ShapeProps, 'radius' | 'verticesCount' | 'color' | 'modifiers'>) => ShapeJSXElement,
Pill: (props: Pick<ShapeProps, 'smoothing' | 'color' | 'modifiers'>) => ShapeJSXElement,
PillStar: (props: ShapeProps) => ShapeJSXElement,
Polygon: (props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'verticesCount' | 'color' | 'modifiers'>) => ShapeJSXElement,
Rectangle: (props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'color' | 'modifiers'>) => ShapeJSXElement,
RoundedCorner: (props: Pick<ShapeProps, 'cornerRadii' | 'color' | 'modifiers'>) => ShapeJSXElement,
Star: (props: ShapeProps) => ShapeJSXElement
}
Props
CornerRadiiCorner radii for RoundedCorner shape. Values are in dp.
number • Default: 0.0Corner rounding percentage. Multiplied by the shorter dimension of the view to produce pixel values.
number • Default: 1.0Inner radius of star-related shapes ('STAR' and 'PILL_STAR'). Multiplied by the shorter dimension of the view to produce pixel values.
number • Default: 1.0Radius of the circular shape. Multiplied by the shorter dimension of the view to produce pixel values.
number • Default: 0.0Number between 0.0 and 1.0 that determines how much each line between vertices is "smoothed".