UX4G Logo
Components

Result List

High-density expandable search results, application tracking cards, and grievance list rows with metadata pills, status tags, and detail grids

The UX4G Result List (and its companion alias Ux4gResultRow) provides an expandable list item component designed for government service portals, application tracking dashboards, search listings, and grievance monitoring systems.

Key Capabilities

  • Expandable Accordion Behavior: Smooth animated expansion (AnimatedVisibility) revealing structured 2-column (or custom) metadata details grids.
  • Status Tags & Pill Segments: Integrates with Ux4gTag (e.g. Approved, Pending, Rejected) and Ux4gUnifiedPillTag metadata segments.
  • Action Buttons: Built-in outline CTA button with optional leading icons (e.g., "View Details", "Download", "Track Status").
  • Customizable Layout: Configurable detail columns, custom trailing icons, title badges, and bottom dividers.

Import from:

import com.ux4g.designsystemv1.components.resultlist.*

Interactive Preview

Collapsed & Expanded States

The preview below illustrates both the compact Collapsed row state and the detailed Expanded state showing the metadata grid and active chevron indicator.

Ux4gResultListJetpack Compose
Collapsed State
UX4G Result List Collapsed Preview
Expanded State
UX4G Result List Expanded Preview

Complete Kotlin Implementation

1. Application Tracking Card with Status Tag

ApplicationTrackingCard.kt
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.card.Ux4gCard
import com.ux4g.designsystemv1.components.resultlist.*
import com.ux4g.designsystemv1.components.tag.Ux4gTagColor
import com.ux4g.designsystemv1.foundation.Ux4gColors

@Composable
fun ApplicationTrackingExample() {
    Ux4gCard(
        modifier = Modifier.fillMaxWidth(),
        cornerRadius = 12.dp,
        borderColor = Ux4gColors.neutral900.copy(alpha = 0.12f),
        borderWidth = 1.dp
    ) {
        Ux4gResultList(
            title = "Pradhan Mantri Awas Yojana (Urban)",
            statusTag = "Approved",
            tagColorScheme = Ux4gTagColor.Success,
            actionButtonText = "View Details",
            onActionPressed = { /* Navigate to details */ },
            details = listOf(
                Ux4gResultDetail(label = "Applicant", value = "Ravi Kumar"),
                Ux4gResultDetail(label = "Application No", value = "PMAY-2025-09821"),
                Ux4gResultDetail(label = "Sanctioned Amount", value = "₹ 2,67,000", isBold = true),
                Ux4gResultDetail(label = "Disbursement Status", value = "Stage 2 Credited", valueColor = Ux4gColors.green600)
            ),
            showBottomDivider = false
        )
    }
}

2. Document Download Row with Trailing Icon

CertificateResultRow.kt
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.ux4g.designsystemv1.components.resultlist.*
import com.ux4g.designsystemv1.foundation.Ux4gColors
import com.ux4g.designsystemv1.foundation.Ux4gIconComponent
import com.ux4g.designsystemv1.foundation.Ux4gIcons

@Composable
fun VerifiedCertificateRow() {
    Ux4gResultRow(
        title = "Income Certificate",
        titleTrailing = {
            Ux4gIconComponent(
                icon = Ux4gIcons.success_circle,
                contentDescription = "Verified Certificate",
                tint = Ux4gColors.green600,
                modifier = Modifier.size(18.dp)
            )
        },
        actionButtonText = "Download",
        actionButtonIcon = Ux4gIcons.upload,
        onActionPressed = { /* Initiate download */ },
        details = listOf(
            Ux4gResultDetail(label = "Reference Number", value = "INC-2026-MH-04127"),
            Ux4gResultDetail(label = "Issued Date", value = "05 Apr 2026"),
            Ux4gResultDetail(label = "Valid Till", value = "05 Apr 2027"),
            Ux4gResultDetail(label = "Issuing Authority", value = "Tehsildar Office, Pune")
        )
    )
}

Parameters & API Reference

1. Ux4gResultList / Ux4gResultRow Composable

PropTypeDescriptionDefault
title *StringPrimary heading title of the result row item.—
modifierModifierCompose modifier applied to the outer container.Modifier
titleTrailing(@Composable () -> Unit)?Optional composable trailing the title (e.g. verified icon badge).null
statusTagString?Optional status text displayed inside a rectangular tonal Ux4gTag.null
tagColorSchemeUx4gTagColorColor scheme for the status tag (Neutral, Success, Warning, Error, Primary).Ux4gTagColor.Neutral
metadataSegmentsList<Ux4gPillSegment>?List of metadata pill segments displayed in a unified pill tag.null
customMetadata(@Composable () -> Unit)?Custom composable replacement for metadata tags.null
actionButtonTextString?Label text for the outline action button on the right.null
actionLeading(@Composable () -> Unit)?Optional composable rendered immediately before the action button.null
onActionPressed(() -> Unit)?Callback invoked when the action button is clicked.null
actionButtonIconUx4gIcon?Optional leading icon rendered inside the action button.null
actionButtonColorColor?Custom color override for the action button border and content.null
detailsList<Ux4gResultDetail>List of detail key-value items rendered in a grid when expanded.emptyList()
expandedChild(@Composable () -> Unit)?Custom composable placed below the details grid when expanded.null
detailsColumnsIntNumber of columns for laying out the details grid.2
initialExpandedBooleanWhether the item starts expanded by default.false
onToggle((Boolean) -> Unit)?Callback triggered when the expanded/collapsed state changes.null
showBottomDividerBooleanWhether to render a horizontal divider below the row.true
contentPaddingPaddingValuesInner padding for the header and expanded content.PaddingValues(16.dp)
colorsUx4gResultListColorsColor configuration for titles, labels, values, and expand arrows.Ux4gResultListDefaults.colors()

2. Ux4gResultDetail Data Model

Represents a single metadata cell displayed within the expanded grid.

FieldTypeDescriptionDefault
label *StringDescriptor title (e.g., "Application No", "Sanctioned Date").—
value *StringValue string displayed beneath the label.—
iconUx4gIcon?Optional icon preceding the value string.null
valueColorColor?Custom text and icon color override for this value.null
isBoldBooleanWhether the value text is rendered with bold typography.false
customValueWidget(@Composable () -> Unit)?Custom composable override for the value content.null

3. Ux4gPillSegment Data Model

Used inside metadataSegments to build composite pill badges.

FieldTypeDescriptionDefault
text *StringText content of the individual metadata segment (e.g. "2 days remaining").—
textColorColor?Custom text color override for this segment.null
boldBooleanRenders segment text with bold font weight when true.false
iconUx4gIcon?Optional leading icon preceding the segment text.null

4. Ux4gResultListColors Reference Guide

Color TokenDefault Light ColorDescription
titleColorUx4gColors.neutral900Color of the primary title text
onSurfaceUx4gColors.neutral900Foreground color for default elements and action button
surfaceUx4gColors.whiteBackground surface color
dividerColorUx4gColors.neutral900 (10% alpha)Color for bottom separator line
labelColorUx4gColors.neutral900 (50% alpha)Color for metadata descriptor labels
valueColorUx4gColors.neutral900Default color for metadata values
expandIconColorUx4gColors.neutral900 (80% alpha)Color for the rotating chevron expand/collapse arrow

On this page