feat(switch): implement new web switch - #774
Conversation
BREAKING CHANGE: Remove legacy Switch style and motion props in favor of appearance and shape.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a686c06517
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 351bbe7683
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| width, | ||
| paddingBlock: spacing.component.xs2, | ||
| paddingInline: spacing.component.xs2, | ||
| borderRadius: radii.xs3, |
There was a problem hiding this comment.
В Figma для всех трёх размеров Switch указан Radius/2xs. В foundations ему соответствует radii.xs2 со значением 4px, а используемый здесь radii.xs3 — это 3xs, то есть 2px.
Из-за этого варианты Sm, Md и Lg получаются более квадратными, чем утверждённый компонент, во всех темах и состояниях. Здесь нужен radii.xs2.
BREAKING CHANGE: Remove legacy Switch style and motion props in favor of appearance and shape.
Таска
Как проверять
Действие: Переключить размеры, тему, состояния checked/disabled/focused и custom thumb; проверить переключение кликом и клавишами Space/Enter
Ожидаемый результат: Switch корректно отображается во всех размерах и темах, disabled не переключается, focus виден, thumb плавно перемещается и поворачивается на 180°, пользовательский thumb работает так же
Пруфы
Details
2026-09-08.02.57.35.mov