Skip to content

DesignLibrary

The central design token library providing color, spacing, border width, and border radius tokens. Access through the DesignLibrary.shared singleton.

Access

Swift
let designLibrary = DesignLibrary.shared

Properties

PropertyTypeRequiredDefaultDescription
colorColorTokens--Color tokens for backgrounds, text, and brand colors
spaceSpaceToken--Spacing tokens for margins and padding
borderSizeBorderWidthToken--Border width tokens
borderRadiusBorderRadiusToken--Border radius tokens for corner rounding

Usage Examples

Access design tokens

Swift
import RealtimeKitUI
let designLibrary = DesignLibrary.shared
// Access color tokens
let backgroundColor = designLibrary.color.background
let textColor = designLibrary.color.text
// Access spacing tokens
let padding = designLibrary.space.space4
// Access border tokens
let borderWidth = designLibrary.borderSize.thin
let cornerRadius = designLibrary.borderRadius.rounded