feat(HorizontalScroll): add slotProps to customize arrows and improve positioning of arrows#9374
Open
EldarMuhamethanov wants to merge 2 commits intomasterfrom
Open
Conversation
Contributor
size-limit report 📦
|
Contributor
e2e tests
|
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9374 +/- ##
==========================================
- Coverage 94.73% 94.72% -0.01%
==========================================
Files 440 440
Lines 11898 11912 +14
Branches 4386 4393 +7
==========================================
+ Hits 11271 11284 +13
- Misses 627 628 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
👀 Docs deployed
📦 Package ✅yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9374/08afa8f8f19d0d0e4f50487caa15064b4f7567cb/pkg/@vkontakte/vkui/_pkg.tgzCommit 08afa8f |
SevereCloud
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Добавлена возможность более гибкого управления позиционированием стрелок в компоненте
HorizontalScrollчерез новое свойствоslotProps, а также добавлено горизонтальное смещение иконок стрелок через свойствоoffsetXв компонентеScrollArrow.Основные изменения:
offsetXдля горизонтального смещения иконки стрелки с учетом направления текста (RTL/LTR)slotPropsс ключамиprevArrowиnextArrowдля гибкой настройки стрелокarrowOffsetXдля горизонтального смещения иконок стрелок (аналогичноarrowOffsetY)prevButtonTestIdиnextButtonTestIdс предупреждением в development-режимеИзменения
ScrollArrow
offsetX?: number | stringдля горизонтального смещения иконкиoffsetXучитываетtextDirection:direction="left": в LTR применяетсяleft, в RTL —rightdirection="right": в LTR применяетсяright, в RTL —leftHorizontalScroll
slotPropsс типамиprevArrowиnextArrowдля передачи любых свойств в компоненты стрелокarrowOffsetX?: number | stringдля горизонтального смещения иконок стрелокprevButtonTestIdиnextButtonTestIdпомечены как@deprecated Since 8.0.0с предупреждением в development-режимеRelease notes
Улучшения
HorizontalScroll:
slotPropsдля гибкой настройки стрелок навигации (позволяет передавать любые свойства вprevArrowиnextArrow)arrowOffsetXдля горизонтального смещения иконок стрелок (аналогичноarrowOffsetYдля вертикального смещения)prevButtonTestIdиnextButtonTestIdпомечены как устаревшие, рекомендуется использоватьslotProps={ prevArrow: { 'data-testid': ... }, nextArrow: { 'data-testid': ... } }ScrollArrow: Добавлено свойство
offsetXдля горизонтального смещения иконки стрелки с учетом направления текста (RTL/LTR)