ExpandableText
Expand the text with the "more" button.(SwiftUI)
Install / Use
npx skills add NuPlay/ExpandableTextInstalls into whichever agent you are using.
README
Get Started
import SwiftUI
import ExpandableText
struct ExpandableText_Test: View {
@State private var sampleText: String = "Do you think you're living an ordinary life? You are so mistaken it's difficult to even explain. The mere fact that you exist makes you extraordinary. The odds of you existing are less than winning the lottery, but here you are. Are you going to let this extraordinary opportunity pass?"
var body: some View {
ExpandableText(text: sampleText)
.font(.body)//optional
.foregroundColor(.primary)//optional
.lineLimit(3)//optional
.expandButton(TextSet(text: "more", font: .body, color: .blue))//optional
.collapseButton(TextSet(text: "less", font: .body, color: .blue))//optional
.expandAnimation(.easeOut)//optional
.padding(.horizontal, 24)//optional
}
}
Modifier(optional)
Modifier | Default
--- | ---
.font(_ font: Font) | .body
.lineLimit(_ lineLimit: Int) | 3
.foregroundColor(_ color: Color) | .primary
.expandButton(_ expandButton: TextSet) | TextSet(text: "more", font: .body, color: .blue)
.collapseButton(_ collapseButton: TextSet?) | nil(If it's nil, it doesn't show)
.expandAnimation(_ animation: Animation?) | .none
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
