Documentation Index
Fetch the complete documentation index at: https://docs.prism.byescaleira.com/llms.txt
Use this file to discover all available pages before exploring further.
PrismUI is a complete SwiftUI design system for Apple-platform apps. Every visual decision—colors, typography, spacing, corner radii, shadows, and animations—flows from six semantic token types, so your entire app updates consistently when you switch themes. The module ships with 80+ components across five categories, four built-in themes (including always-dark and high-contrast), and built-in VoiceOver, Dynamic Type, and reduced-motion support.
Installation
Design tokens
Six token types drive every component. You consume them through SwiftUI modifier APIs rather than raw values, so your views remain theme-aware without hard-coded constants.| Token | Purpose | Example values |
|---|---|---|
ColorToken | 28 semantic color roles | brand, onBackground, surfaceSecondary, error |
TypographyToken | Text styles with optical sizing | largeTitle, title, body, caption2 |
SpacingToken | 4-pt grid spacing scale | xs (4 pt) → xxxl (64 pt) |
RadiusToken | Continuous corner radii | sm (8 pt) → full (1000 pt) |
ElevationToken | Shadow hierarchy | flat → overlay |
MotionToken | Reduce-motion-aware durations | instant → expressive |
Themes
You apply a theme once at the root of your view hierarchy and every PrismUI component inherits it.| Theme | Description |
|---|---|
DefaultTheme | Apple HIG system colors; respects the system light/dark appearance |
DarkTheme | Always renders in dark mode regardless of system settings |
HighContrastTheme | Maximum contrast ratios for accessibility (WCAG AAA) |
BrandTheme | Configurable primary, secondary, and accent colors |
Components
PrismUI ships 80+ components across five categories. All components respect the active theme and inherit the accessibility settings of the host device.Primitives
Core building blocks used throughout every screen.PrismButton— filled, tinted, bordered, or text variant; supports async actionsPrismIcon— SF Symbols with semantic sizingPrismAsyncImage— remote image loading with placeholder and error statesPrismTextField— validation rules including pattern matchingPrismCard— surface-aware container with configurable elevationPrismTag,PrismChip— label components with optional dismissalPrismDivider— themed separatorPrismLoadingState,PrismProgressBar— loading indicatorsPrismAvatar— initials or image with presence status indicator
Composites
Higher-order components that combine primitives.PrismAlert— themed alert with configurable actionsPrismBanner— informational banners with severity levelsPrismCarousel— paged horizontal scroll with analytics eventsPrismSearchBar— search input with debounced bindingPrismToolbar— navigation toolbar with leading and trailing itemsPrismToast— auto-dismissing notification overlayPrismMenu— contextual action menuPrismBottomSheet— drag-to-dismiss sheet with snap pointsPrismTooltip— inline explanatory popoverPrismEmptyState— zero-data placeholder with actionPrismCountdownTimer— animated countdown display
Forms
Input controls with built-in validation and accessibility labels.PrismToggle,PrismPicker,PrismSliderPrismSecureField,PrismDatePicker,PrismTextAreaPrismSegmentedControl,PrismStepper,PrismRatingPrismPinField— PIN / OTP entryPrismColorWell— color selection input
Lists
Scrollable content patterns with swipe and disclosure support.PrismRow— single-line or multi-line list rowPrismDisclosureRow— expandable disclosure rowPrismList— themed list containerPrismBadge— numeric or dot badge overlayPrismSwipeActions— leading and trailing swipe actions
Layout
Adaptive container views that respond to size classes and screen geometry.PrismAdaptiveStack— switches betweenHStackandVStackbased on available widthPrismGrid— fixed or adaptive grid layoutPrismSection— grouped content section with optional header and footerPrismScaffold— full-screen layout with safe area and backgroundPrismSpacer— token-aware flexible spacer
Accessibility
Every PrismUI component ships with:- VoiceOver — semantic labels and traits on all interactive elements
- Dynamic Type — all text styles scale with the user’s preferred font size
- Reduce Motion —
MotionTokenresolves to instant oreaseOutdurations based on the accessibility setting - Contrast —
HighContrastThemevalidates WCAG AA and AAA contrast ratios viaPrismAccessibilityTest - Snapshot testing —
PrismSnapshotTestcaptures visual regression baselines for all four themes
For detailed token values, component props, and theme customization APIs, see the design-system pages linked in the sidebar.