Summary
Complete public Button support so buttons render their labels and invoke their actions through supported input mechanisms.
Scope
- Complete the generic
Button implementation and its common label, title, and role initializers.
- Connect pointer or touch activation to the button action, including disabled-state handling.
- Integrate
ButtonStyle, PrimitiveButtonStyle, their configuration values, .buttonStyle(_:), and baseline default, plain, and borderless styles.
- Propagate label, role, enabled, and pressed state through the style pipeline.
- Add examples and focused coverage for rendering, activation, disabled buttons, roles, and custom styles.
Acceptance criteria
Button("Run") { ... } renders its label and invokes its action once per activation.
- A disabled button does not invoke its action.
- Custom button styles receive the expected label, role, and pressed state.
- Primitive button styles can trigger the configured action.
- Button activation participates in the supported host's normal focus and accessibility behavior.
API reference
Summary
Complete public
Buttonsupport so buttons render their labels and invoke their actions through supported input mechanisms.Scope
Buttonimplementation and its common label, title, and role initializers.ButtonStyle,PrimitiveButtonStyle, their configuration values,.buttonStyle(_:), and baseline default, plain, and borderless styles.Acceptance criteria
Button("Run") { ... }renders its label and invokes its action once per activation.API reference