One of a few options side by side: the thumb is thrown to the new segment while its width eases to the new label.
pnpm dlx shadcn@latest add "https://hairlineui.com/r/segmented-control.json"