This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
形状
用于绘制几何形状的 Jetpack Compose 形状组件。
Android
Included in Expo Go
Recommended version:
~57.0.22
Expo UI Shape 与官方 Jetpack Compose Shapes API 相匹配,并提供了一组用于绘制几何形状的子组件,例如星形、圆形、矩形、胶囊形和多边形。
🌐 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.
Corner radii for RoundedCorner shape. Values are in dp.
cornerRounding
Android
Optional • Type: number • Default: 0.0
Corner rounding percentage. Multiplied by the shorter dimension of the view to produce pixel values.
innerRadius
Android
Optional • Type: number • Default: 1.0
Inner radius of star-related shapes ('STAR' and 'PILL_STAR'). Multiplied by the shorter dimension of the view to produce pixel values.
modifiers
Android
Optional • Type: ModifierConfig[]
Modifiers for the component.
radius
Android
Optional • Type: number • Default: 1.0
Radius of the circular shape. Multiplied by the shorter dimension of the view to produce pixel values.
smoothing
Android
Optional • Type: number • Default: 0.0
Number between 0.0 and 1.0 that determines how much each line between vertices is "smoothed".
verticesCount
Android
Optional • Type: number • Default: 6.0
Number of vertices. For 'POLYGON' it must be at least 3.0. For 'STAR' and 'PILL_STAR' it is a number of vertices for each of two radii (A 5-pointed star has 10 vertices.)