SimpleSwiftUIStarRating

1.1.0

A simple component used to view star ratings in SwiftUI.
ben-wheeler/SimpleSwiftUIStarRating

What's New

v1.1.0

2025-01-30T11:03:24Z

Introduces the ability to resize the stars using SwiftUI's .font() modifier.

SimpleSwiftUIStarRating

A simple component used to view star ratings in SwiftUI. \n Sizing can be controlled via .font() and other SwiftUI related synatx.

Requires:

iOS 14+

Installation

Installation can be handled via Xcode.

File > Add package dependencies using the Package URL: https://github.com/ben-wheeler/SimpleSwiftUIStarRating

See Xcode documentation for more details.

Usages

Component can easily be created with only a rating:. But can also take in additional color and maxRating. For Example:

SimpleSwiftUIStarRating(rating: 1.5)
SimpleSwiftUIStarRating(rating: 4.0, maxRating: 10)
SimpleSwiftUIStarRating(rating: 3.5, starColor: .red)

Sizing can be controlled via font().

Example usage:

image
SimpleSwiftUIStarRating(rating: 3.5, maxRating: 5, starColor: .red)
SimpleSwiftUIStarRating(rating: 4.0, maxRating: 10, starColor: .blue)
SimpleSwiftUIStarRating(rating: 1.5, maxRating: nil, starColor: nil)
    .font(.title)

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon May 12 2025 01:42:08 GMT-0900 (Hawaii-Aleutian Daylight Time)