ouds-ios-components-controls

Installation
SKILL.md

OUDS Controls components

Prerequisite: load ouds-ios-framework-usage first for imports, themes and image rules (OUDSImage, // swiftlint:disable:next accessibility_label_for_image).

Common patterns (shared across most Controls)

These patterns apply to Checkbox, Radio, Switch, TextInput, TextArea, PinCodeInput, PasswordInput unless noted otherwise.

Pattern Syntax
Error state isError: true, errorText: .raw("Message") — errorText is an OUDSTextualContent (.raw, .localized, .rich); prefer .raw("…") to a bare literal to avoid a deprecation warning
Rich error errorText: .rich(AttributedString)
Plain helper helperText: .raw("…") (OUDSTextArea: helperText: .textual("…")) — helperText is an OUDSTextualContent (.raw, .localized, .rich); prefer .raw("…") to a bare literal to avoid a deprecation warning
Rich helper helperText: .rich(AttributedString) (OUDSTextArea: helperText: .textual(.rich(AttributedString)))
Error status (inputs) status: .textualError(message: "…") — message is an OUDSTextualContent
Rich error status status: .textualError(message: .rich(AttributedString))
Read-only isReadOnly: true
Disabled .disabled(true) — never combine with isError or isReadOnly
Installs
2
GitHub Stars
37
First Seen
3 days ago