You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @vaporvee! I'm Dosu and I'm helping the Dokploy team.
The problem is in apps/dokploy/components/ui/switch.tsx. The thumb element uses translate-x-[calc(100%-2px)] for the checked state [1], but 100% here refers to the thumb's own width (16px for default, 12px for sm), not the track width — so it only translates ~14px/~10px instead of the full distance across the track. This produces the misaligned thumb you're seeing.
A fix would be replacing the calc values with explicit pixel offsets that match track width minus thumb size minus borders. For the default size (track w-9 = 36px, thumb size-4 = 16px) and the sm size (track w-[24px], thumb size-3 = 12px) [2], something like:
Activity
linear-code commentedon Aug 18, 2026
DOK-660
dosubot commentedon Aug 18, 2026
Hi @vaporvee! I'm Dosu and I'm helping the Dokploy team.
The problem is in
apps/dokploy/components/ui/switch.tsx. The thumb element usestranslate-x-[calc(100%-2px)]for the checked state [1], but100%here refers to the thumb's own width (16px for default, 12px for sm), not the track width — so it only translates ~14px/~10px instead of the full distance across the track. This produces the misaligned thumb you're seeing.A fix would be replacing the
calcvalues with explicit pixel offsets that match track width minus thumb size minus borders. For the default size (trackw-9= 36px, thumbsize-4= 16px) and the sm size (trackw-[24px], thumbsize-3= 12px) [2], something like:Or, as you suggested, just pull in the canonical shadcn switch component from https://ui.shadcn.com/docs/components/base/switch — that's the most reliable baseline.
If you'd like to send a PR, the relevant code is the
SwitchPrimitive.ThumbclassName on lines 23–26.To reply, just mention @dosu.
Docs are dead. Just use Dosu.
fix: correct switch thumb translate-x for checked state
Merge upstream v0.30.2 into main
chore(release): 0.42.0 [skip ci]