ouds-ios-components-controls
Installation
SKILL.md
OUDS Controls components
Prerequisite: load
ouds-ios-framework-usagefirst 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 |