RoundedRectangle

A rectangular shape with rounded corners, aligned inside the frame of the view containing it.

ComponentiOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+RoundedRectangle in SwiftUI

Declaration

React
import { RoundedRectangle } from 'swiftui-react-native';
Swift
@frozen struct RoundedRectangle

Initializers

2 SwiftUI initializers back <RoundedRectangle>. The props you pass pick one.

React
<RoundedRectangle
  cornerRadius: number
  roundedCornerStyle?: SwiftUI.RoundedCornerStyle
/>
Swift
init(cornerRadius: CGFloat, style: RoundedCornerStyle = .continuous)

Also takes the common view props: modifiers, style and testID.

See also

More in Shapes.