Skip to main content

EV and energy components

Electric vehicle energy UI: state of charge, range, charging session status, and energy usage — optimized for glanceability and clear fault presentation.

Purpose

  • Show SOC, range, and charge state without forcing deep navigation.
  • Make charging faults and cable state obvious.
  • Support OEM brand while locking semantic charging colors’ meaning.

Component set (planned)

ComponentRoleSafety class
EvSocGaugePrimary SOC visualizationInformational
EvRangeLabelDistance estimateInformational
EvChargeSessionPlug state, power, time-to-fullInformational / fault
EvChargeFaultBannerCharge faultsSafety-adjacent warning
EvEnergyUsageConsumption breakdownInformational (Park-friendly)
EvQuickStatusStatus bar compact SOCInformational

States

  • Idle / driving / charging / charge complete / fault / unavailable
  • AC vs DC charging (presentation may differ; tokens shared)
  • Target SOC scheduled charging (configuration often Park-only)

Compliance

ConcernRule
GlanceLarge SOC; tabular figures (a11y)
DrivingDefer energy analytics and schedule editing (driving)
SafetyFault banners use locked semantic colors; exhaustive signal handling (safety)
ContrastGauge readable day/night

Token dependencies

  • cabin.color.semantic.charging
  • cabin.component.ev.gauge.size
  • cabin.type.role.display / status
  • Warning/error semantics for faults

Planned Compose API

// Planned
@Composable
fun EvSocGauge(
signal: Signal<EvSoc>,
modifier: Modifier = Modifier,
)

@Composable
fun EvChargeSession(
session: Signal<ChargeSession>,
onStopCharge: (() -> Unit)? = null,
modifier: Modifier = Modifier,
)

Planned Views API

// Planned
class EvSocGaugeView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
) : View(context, attrs) {
fun bind(signal: Signal<EvSoc>) { /* … */ }
}

Parity notes

Signal degradation (unavailable/stale/fault) must render equivalent copy and icons on both stacks. Gauge geometry may differ slightly; numeric SOC must not.

Acceptance criteria

  • SOC/range never show invented values when unavailable
  • Fault banner meets safety patterns
  • Schedule/settings gated while driving
  • Charging semantic color preserved under OEM overlay
  • Dual-stack parity for SOC + fault