Skip to content

RtkButton

A versatile button that follows the RTK Design System. Supports multiple styles, states, and sizes.

Initializer parameters

ParameterTypeRequiredDefaultDescription
styleStyle.solidThe button style (solid, line, icon-left, and others)
rtkButtonStateStates.activeThe initial state of the button
sizeSize.largeThe size of the button
appearanceRtkButtonAppearance-Appearance configuration for colors and fonts

Usage Examples

Basic Usage

Swift
import RealtimeKitUI
let button = RtkButton()
button.setTitle("Join", for: .normal)
view.addSubview(button)

With custom style

Swift
import RealtimeKitUI
let button = RtkButton(
style: .line,
rtkButtonState: .active,
size: .large
)
button.setTitle("Cancel", for: .normal)
view.addSubview(button)