Developer docs / UI components

Measurements

Description

Components for body measurements such as weight.

WeightProgress

Description

A summary of the member's weight: their current weight and their goal. Tapping it opens a sheet where the member enters a new weight or goes on to edit their goal.

Basic usage

tsx
{{code.b0}}

Props

PropTypeDescription
weightProgress (required){ weightGoal: PlanArtifactWeight | null; weightTracking: WeightTracking | null }The result of getWeightProgress.
bodyComposition (required)BodyComposition | nullThe result of getBodyComposition. Required by the props type, which WeightProgress shares with the other body-stats components; WeightProgress itself shows weight only.
isLoadingbooleanIf true, shows the loading state.
onUpdateWeightTracking(weightGoal: PlanArtifactWeight) => Promise<void>Called after the member saves a new weight, with the saved weight entry (despite the parameter name).
onUpdateWeightGoal() => voidCalled when the member chooses to edit their weight goal. We recommend opening the UserSettings component, where the goal is edited.
← Goals and tracking Next: Settings →