Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zunda-pixel/chatbubble

ChatBubble SwiftUI
https://github.com/zunda-pixel/chatbubble

swift swift-package-manager swiftui

Last synced: 3 months ago
JSON representation

ChatBubble SwiftUI

Awesome Lists containing this project

README

        

# ChatBubble

スクリーンショット 2022-11-15 0 32 34スクリーンショット 2022-11-15 0 47 58

```swift
struct SingleChatBubble: PreviewProvider {
static var previews: some View {
Text("Stanford Video Steve Jobs’ 2005 Stanford Commencement Address I am honored to be with you today at your commencement from one of the finest universities in the world.")
.fixedSize(horizontal: false, vertical: true)
.chatBubble(
direction: .leadingTop,
cornerRadius: 17,
color: .blue.opacity(0.5)
)
}
}
```

```swift
struct ShapePreview: PreviewProvider {
static var previews: some View {
ChatBubble(cornerRadius: 17)
.frame(width: 300, height: 100)
.foregroundColor(.cyan)
}
}
```

```swift
struct RawChatBubble: PreviewProvider {
static var previews: some View {
Text("Sample Text.")
.fixedSize(horizontal: false, vertical: true)
.padding()
.background {
ChatBubble(cornerRadius: 17)
.rotateChatBubble(position: .trailingBottom)
.foregroundColor(.red.opacity(0.5))
}
}
}
```

## 参考にしたもの

https://qiita.com/yuppejp/items/92429a0fc8440f9da487