← Cloudflare Realtime / realtime / realtimekit / ui-kit / api-reference / ios
DesignLibrary
The central design token library providing color, spacing, border width, and border radius tokens.
Access through the DesignLibrary.shared singleton.
Access
let designLibrary = DesignLibrary.sharedProperties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
color |
ColorTokens |
- | - | Color tokens for backgrounds, text, and brand colors |
space |
SpaceToken |
- | - | Spacing tokens for margins and padding |
borderSize |
BorderWidthToken |
- | - | Border width tokens |
borderRadius |
BorderRadiusToken |
- | - | Border radius tokens for corner rounding |
Usage Examples
Access design tokens
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