UX4G Logo
Components

Feedback Form

Comprehensive citizen feedback suite featuring 5-Star Ratings with improvement tags, CSAT sentiment face scales, and NPS (0-10) recommendation forms

The UX4G Feedback Form suite provides citizen sentiment and satisfaction rating components with confirmation screens, improvement tag chips, multiline remarks, and skip callbacks:

  1. Star Rating Feedback Form (Ux4gFeedbackFormStar): 5-star interactive rating with dynamic low/high color thresholds, improvement category chips, and comment box.
  2. CSAT Satisfaction Form (Ux4gFeedbackFormCsat): 5-point sentiment face rating scale with color-coded feedback states and descriptive scale labels (← Bad, Good →).
  3. NPS Recommendation Form (Ux4gFeedbackFormNps): Net Promoter Score (0 to 10) horizontal scale with low (0-3), medium (4-6), and high (7-10) score highlights.

Import from com.ux4g.designsystemv1.components.feedback.*.


Interactive Previews

1. Star Rating Form (Ux4gFeedbackFormStar)

Ux4gFeedbackFormStar (5-Star & Improvement Chips)Jetpack Compose
UX4G Star Feedback Form Preview

2. CSAT Sentiment Form (Ux4gFeedbackFormCsat)

Ux4gFeedbackFormCsat (5-Face Sentiment Scale)Jetpack Compose
UX4G CSAT Feedback Form Preview

3. NPS Form (Ux4gFeedbackFormNps)

Ux4gFeedbackFormNps (0-10 Net Promoter Score)Jetpack Compose
UX4G NPS Feedback Form Preview

Kotlin Usage

Feedback Showcase Example
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.ux4g.designsystemv1.components.feedback.Ux4gFeedbackFormCsat
import com.ux4g.designsystemv1.components.feedback.Ux4gFeedbackFormNps
import com.ux4g.designsystemv1.components.feedback.Ux4gFeedbackFormStar

@Composable
fun FeedbackShowcaseScreen() {
    Column(
        modifier = Modifier
            .fillMaxWidth()
            .padding(16.dp),
        verticalArrangement = Arrangement.spacedBy(24.dp)
    ) {
        // 1. Star Feedback Form
        Ux4gFeedbackFormStar(
            improvementOptions = listOf("Service Speed", "Document Upload", "Payment Gateway", "UI Clarity"),
            onSubmit = { rating, chips, comment ->
                // Process 5-star feedback
            },
            onSkip = { /* Skip */ }
        )

        // 2. CSAT Sentiment Form
        Ux4gFeedbackFormCsat(
            onSubmit = { score, comment ->
                // Process 1-5 CSAT
            },
            onSkip = { /* Skip */ }
        )

        // 3. NPS 0-10 Form
        Ux4gFeedbackFormNps(
            onSubmit = { score, comment ->
                // Process NPS score
            },
            onSkip = { /* Skip */ }
        )
    }
}

Parameters

1. Ux4gFeedbackFormStar Props

PropTypeDescriptionDefault
improvementOptions *List<String>List of selectable improvement tag chips.—
onSubmit *(rating: Int, selectedChips: List<String>, comment: String) -> UnitCallback with selected star rating (1-5), chips, and comment.—
modifierModifierCompose layout modifier applied to outer card container.Modifier
minWordsIntMinimum word count required in comment before submit enables.0
maxLengthIntMaximum character length allowed in comment.200
onSkip(() -> Unit)?Optional callback when citizen taps the skip button.null
onCloseSuccess(() -> Unit)?Callback invoked when citizen closes the success screen.null
chipBorderRadiusDpCorner radius of the improvement tag chips.4.dp
titleStringForm title heading prompt."Rate your experience"
improvementTitleStringSection title above the improvement chips."What can we improve?"
commentPlaceholderStringPlaceholder text inside multiline comment text area."Tell us more about your experience"
submitButtonTextStringLabel text on the primary submit button."Submit"
skipButtonTextStringLabel text on the optional skip button."Skip"
successTitleStringHeadline text displayed on success confirmation screen."Feedback submitted"
successMessageStringDescriptive message on success confirmation screen."Thank you for your feedback. This helps improve government services."
ratingIconUx4gIconIcon rendered for rating stars.Ux4gIcons.Star
successIconUx4gIconIcon rendered on success confirmation.Ux4gIcons.ThumbUp
lowRatingColorColorColor applied to stars with rating at or below lowRatingThreshold.Ux4gColors.red600
highRatingColorColorColor applied to stars with rating above lowRatingThreshold.Ux4gColors.yellow600
lowRatingThresholdIntStar index cutoff for low vs high rating colors.2

2. Ux4gFeedbackFormCsat Props

PropTypeDescriptionDefault
onSubmit *(score: Int, comment: String) -> UnitCallback providing selected score (1 to 5) and feedback comment.—
modifierModifierCompose layout modifier.Modifier
minWordsIntMinimum word count required in comment.0
maxLengthIntMaximum comment character length.200
onSkip(() -> Unit)?Callback when skip button is tapped.null
onCloseSuccess(() -> Unit)?Callback when success screen is closed.null
titleStringForm question title."How do you feel about this service?"
badLabelStringLeft label below the low sentiment faces."← Bad"
goodLabelStringRight label below the high sentiment faces."Good →"
commentPlaceholderStringPlaceholder text inside comment text area."Please tell us how can we improve"
submitButtonTextStringSubmit button label."Submit"
skipButtonTextStringSkip button label."Skip"
successTitleStringSuccess confirmation title."Feedback submitted"
successMessageStringSuccess confirmation message."Thank you for your feedback. This helps improve government services."
ratingFacesList<Ux4gIcon>List of 5 sentiment face icons from saddest to happiest.listOf(ic_face_0, ..., ic_face_4)
successIconUx4gIconIcon on success confirmation.Ux4gIcons.ThumbUp

3. Ux4gFeedbackFormNps Props

PropTypeDescriptionDefault
onSubmit *(score: Int, comment: String) -> UnitCallback providing selected NPS score (0 to 10) and comment.—
modifierModifierCompose layout modifier.Modifier
minWordsIntMinimum word count required in comment.0
maxLengthIntMaximum comment character length.200
onSkip(() -> Unit)?Callback when skip is clicked.null
onCloseSuccess(() -> Unit)?Callback when success screen is closed.null
titleStringForm prompt title."How likely are you to recommend us?"
unlikelyLabelStringLabel below the low score range (0-3)."0 - Extremely Unlikely"
likelyLabelStringLabel below the high score range (7-10)."10 - Extremely Likely"
commentPlaceholderStringPlaceholder inside comment area."Please tell us why you gave this score"
submitButtonTextStringSubmit button text."Submit"
skipButtonTextStringSkip button text."Skip"
successTitleStringSuccess title heading."Feedback submitted"
successMessageStringSuccess confirmation message."Thank you for your feedback. This helps improve government services."
lowScoreBackgroundColorColorHighlight color for scores 0-3.Ux4gColors.red100
mediumScoreBackgroundColorColorHighlight color for scores 4-6.Ux4gColors.orange100
highScoreBackgroundColorColorHighlight color for scores 7-10.Ux4gColors.green100

On this page