Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.48 KB

File metadata and controls

46 lines (34 loc) · 1.48 KB
pcx_content_type reference
title DesignLibrary
description API reference for DesignLibrary component (iOS Library)
products
realtime

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

Access

let designLibrary = DesignLibrary.shared

Properties

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