Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Rating

Named whole-number rating options with controlled values and read-only support.

Public APILumenRatingApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Rating

Named whole-number rating options with controlled values and read-only support. Hosts own application state and business actions.

Rating rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenRating("Rating", value: $rating)

Reference

Public API

The primary shared and platform-specific options exposed by LumenRating.

APIValues or typeDefaultDescription
host content and stateAdapter-specific public contractRequiredKeeps application data and behavior in the host.

Native behavior

Design and accessibility

When to use it

Named whole-number rating options with controlled values and read-only support. Hosts own application state and business actions.

Accessibility

Named whole-number rating options with controlled values and read-only support.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package