A number field with its unit beside it. Switching the unit converts the amount and the figure counts across to the new value rather than jumping, so it is clear the quantity is the same.
pnpm dlx shadcn@latest add "https://caliperui.site/r/unit-field.json"