Capsule

A capsule shape aligned inside the frame of the view containing it.

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

Declaration

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

Initializers

One SwiftUI initializer backs <Capsule>.

React
<Capsule
  roundedCornerStyle?: SwiftUI.RoundedCornerStyle
/>
Swift
init(style: RoundedCornerStyle = .continuous)

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

See also

More in Shapes.