feat(TabBar): add round-glass liquid glass shape - #2628
Open
LiamFan16-mikasa wants to merge 2 commits into
Open
Conversation
16 tasks
LiamFan16-mikasa
force-pushed
the
feat/tabbar-round-glass
branch
from
July 19, 2026 07:55
250dafa to
22d4806
Compare
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.
🤔 这个 PR 的性质是?
🔗 相关 Issue
close #2571
框架侧实现:Tencent/tdesign-mobile-vue#2261
💡 需求背景和解决方案
Issue #2571 希望 TabBar 悬浮胶囊支持 iOS 26 的液态玻璃质感。区别于普通磨砂,液态玻璃的关键是中心通透、折射集中在边缘(meniscus)、镜面流光、边缘轻微色散。
本 PR 在 common 侧新增可共用的
round-glass材质,并抽成可复用 mixin:tab-bar/_var.less:液态玻璃设计 token(中心/边缘模糊、饱和度、透镜边宽、描边宽、高光、阴影、内高光光泽、色散、流光时长)+ opt-in 折射层 token。tab-bar/_index.less:可复用 mixin.tab-bar-liquid-glass()(fab/dialog/popup 可复用)+&--round-glass(中心轻磨砂、::before边缘透镜、::after镜面流光并在prefers-reduced-motion下关闭、inset 色散描边)+&__glass折射层(由--td-tab-bar-glass-image/--td-tab-bar-glass-refract驱动)。折射为 opt-in,组件不引用任何外部滤镜 id(零渲染风险),不支持时自动退化为磨砂。tab-bar-item/_index.less:单项透明 + 按压弹簧回弹 + 自适应半透明选中胶囊。docs/mobile/api/tab-bar.md/.en-US.md:液态玻璃 demo 占位。全部 token 化可覆盖;仅动画
transform/background-position(60fps)。已用lessc和 stylelint 校验。效果预览:
📝 更新日志
☑️ 请求合并前的自查清单