Feedback/DSStarRatingControl

DSStarRatingControl

feedback
since 1.2.0

Interactive star rating control allowing users to input ratings from 0 to 5.

iOSmacOS

Purpose

Use for collecting user ratings, reviews, or feedback. Tappable stars with half-star support.

Props

PropTypeDefaultDescription
valuereqBinding<Double>โ€”Binding to rating value (0.0-5.0)
sizeCGFloat24Star size in points
activeColorColorDSColor.warningFilled star color
accessibilityLabelString?nilOptional accessibility label

Examples

Review form

Interactive rating input for reviews.

swift
@State var rating: Double = 0

VStack(alignment: .leading) {
    Text("Rate this product")
        .font(.system(size: 15, weight: .medium))
    DSStarRatingControl(value: $rating, size: 28)
}

Usage Guidelines

  • Use for collecting user ratings
  • Larger tap targets (24pt+) for better usability
  • Provide clear label explaining what is being rated
  • Consider showing current value numerically alongside stars

Related Components