GitHub 爆火!这个免费 UI 组件库收集了 3000+ 精美组件,前端再也不用重复造轮子
原文链接:https://mp.weixin.qq.com/s/Hjv8Ishd9tngz-LQhrdamA
你有没有经历过这种痛苦?老板一句话:“这个按钮能不能更有科技感一点?”设计师:“这里加个炫酷动画。
你有没有经历过这种痛苦?
老板一句话:“这个按钮能不能更有科技感一点?”
设计师:“这里加个炫酷动画。”
然后你打开 VS Code:
开始手搓:Button、 Card、 Loading、 Checkbox、 Switch、 Tooltip、 Hover 动画
半天过去,最后发现:花了几个小时,只为了造一个已经有人写过无数次的组件。
而现在,一个开源项目正在解决这个问题。
它叫: Uiverse


一个专门收集 UI 元素的开源社区。
一句话总结:这里有数千个设计师和开发者贡献的 UI 组件,复制代码即可使用。
Uiverse 到底是什么?

Uiverse 是一个:社区驱动的开源 UI 元素库
它和传统组件库最大的区别:
不是:
1 2 3 4 5
| `安装 npm 包 ↓ 调用组件 ↓ 接受固定样式`
|
而是:
1 2 3 4 5
| `找到喜欢的 UI ↓ 复制代码 ↓ 直接改成自己的`
|
目前平台提供大量: HTML/CSS、 Tailwind、 React、 Figma 格式的 UI 元素。
开发者可以直接复制、修改并应用到自己的项目中。
它到底有什么?
打开 Uiverse,你会发现这里不像传统 UI 库。
它更像:一个全球开发者共享的 UI 灵感仓库。
里面包含:
Button 按钮

例如:
- 霓虹按钮
- 3D 按钮
- Gradient 按钮
- Hover 动画按钮
Card 卡片

例如:
- 产品卡片
- 用户卡片
- Dashboard 卡片
- Glassmorphism 卡片
Loading 加载动画

不用再写:
直接复制 html 和 css 即可。

Input 输入框

包括:
Toggle / Checkbox

各种:
这些看似简单的小组件,实际上是前端开发中最消耗时间的部分。
Galaxy:Uiverse 的 GitHub 宝库
如果说 Uiverse 是展示平台。
那么:Galaxy 就是它对应的开源仓库。

GitHub:https://github.com/uiverse-io/galaxy
这个项目收集了 Uiverse 上的大量 UI 元素。
官方介绍:Galaxy 是一个最大的开源 UI Library,包含超过 3000 个社区制作的 UI 元素。
仓库中包含:
- Buttons
- Cards
- Forms
- Inputs
- Notifications
- Loaders
- Tooltips
- Toggle switches
等等。
为什么 Uiverse 会火?
因为它踩中了现在前端开发最大的趋势:组件不应该重复制造
过去,每家公司:自己写 Button、 Modal、Loading,自己维护 CSS。结果:大量时间浪费在重复劳动。
而现在,越来越多开发者开始接受:优秀组件应该被共享。
类似:
- shadcn/ui
- Radix UI
- Magic UI
- Aceternity UI
大家都在推动组件复用。
一个组件,从发现到上线只需要几十秒
比如你需要一个炫酷按钮。
以前:
1 2 3 4 5 6 7 8 9 10 11
| `找设计师 ↓ 设计稿 ↓ 切图 ↓ 写 CSS ↓ 调动画 ↓ 测试`
|
可能半天。
现在:
1 2 3 4 5 6 7 8 9
| `打开 Uiverse ↓ 搜索 Button ↓ 复制代码 ↓ 修改颜色 ↓ 上线`
|
一分钟完成。
快速体验

演示效果
比如一个简单 HTML:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| `<div class="loader"> <svg width="100" height="100" viewBox="0 0 100 100"> <defs> <mask id="clipping"> <polygon points="0,0 100,0 100,100 0,100" fill="black"></polygon> <polygon points="25,25 75,25 50,75" fill="white"></polygon> <polygon points="50,25 75,75 25,75" fill="white"></polygon> <polygon points="35,35 65,35 50,65" fill="white"></polygon> <polygon points="35,35 65,35 50,65" fill="white"></polygon> <polygon points="35,35 65,35 50,65" fill="white"></polygon> <polygon points="35,35 65,35 50,65" fill="white"></polygon> </mask> </defs> </svg> <div class="box"></div> </div>`
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
| `.loader { --color-one: [#ffbf48](); --color-two: [#be4a1d](); --color-three: [#ffbf4780](); --color-four: [#bf4a1d80](); --color-five: [#ffbf4740](); --time-animation: 2s; --size: 1; /* You can change the size */ position: relative; border-radius: 50%; transform: scale(var(--size)); box-shadow: 0 0 25px 0 var(--color-three), 0 20px 50px 0 var(--color-four); animation: colorize calc(var(--time-animation) * 3) ease-in-out infinite; }
.loader::before { content: ""; position: absolute; top: 0; left: 0; width: 100px; height: 100px; border-radius: 50%; border-top: solid 1px var(--color-one); border-bottom: solid 1px var(--color-two); background: linear-gradient(180deg, var(--color-five), var(--color-four)); box-shadow: inset 0 10px 10px 0 var(--color-three), inset 0 -10px 10px 0 var(--color-four); }
.loader .box { width: 100px; height: 100px; background: linear-gradient( 180deg, var(--color-one) 30%, var(--color-two) 70% ); mask: url([#clipping]()); -webkit-mask: url([#clipping]()); }
.loader svg { position: absolute; }
.loader svg [#clipping]() { filter: contrast(15); animation: roundness calc(var(--time-animation) / 2) linear infinite; }
.loader svg [#clipping]() polygon { filter: blur(7px); }
.loader svg [#clipping]() polygon:nth-child(1) { transform-origin: 75% 25%; transform: rotate(90deg); }
.loader svg [#clipping]() polygon:nth-child(2) { transform-origin: 50% 50%; animation: rotation var(--time-animation) linear infinite reverse; }
.loader svg [#clipping]() polygon:nth-child(3) { transform-origin: 50% 60%; animation: rotation var(--time-animation) linear infinite; animation-delay: calc(var(--time-animation) / -3); }
.loader svg [#clipping]() polygon:nth-child(4) { transform-origin: 40% 40%; animation: rotation var(--time-animation) linear infinite reverse; }
.loader svg [#clipping]() polygon:nth-child(5) { transform-origin: 40% 40%; animation: rotation var(--time-animation) linear infinite reverse; animation-delay: calc(var(--time-animation) / -2); }
.loader svg [#clipping]() polygon:nth-child(6) { transform-origin: 60% 40%; animation: rotation var(--time-animation) linear infinite; }
.loader svg [#clipping]() polygon:nth-child(7) { transform-origin: 60% 40%; animation: rotation var(--time-animation) linear infinite; animation-delay: calc(var(--time-animation) / -1.5); }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes roundness { 0% { filter: contrast(15); } 20% { filter: contrast(3); } 40% { filter: contrast(3); } 60% { filter: contrast(15); } 100% { filter: contrast(15); } }
@keyframes colorize { 0% { filter: hue-rotate(0deg); } 20% { filter: hue-rotate(-30deg); } 40% { filter: hue-rotate(-60deg); } 60% { filter: hue-rotate(-90deg); } 80% { filter: hue-rotate(-45deg); } 100% { filter: hue-rotate(0deg); } }`
|
Uiverse vs 传统 UI 框架
Uiverse
Ant Design / MUI
定位
UI 元素社区
完整组件库
使用方式
复制代码
npm 安装
自由修改
⭐⭐⭐⭐⭐
⭐⭐⭐
设计风格
丰富多样
统一规范
适合
营销页、创新项目
企业后台
写在最后
Uiverse 解决的不是一个技术问题。
它解决的是:前端开发者为什么每天都在重复造轮子?
一个按钮,一个 Loading,一个动画 Card,这些东西单独看很小,但是累计起来:就是大量开发时间。
如果你是一名前端开发者,建议收藏:Uiverse 和 Galaxy GitHub 仓库
下一次做页面:不要急着写 CSS。
先去这里看看,可能你需要的组件,已经有人帮你写好了。
官网
你手搓过多少个按钮?有没有被”造轮子”折磨过?Uiverse 这种”复制粘贴”的 UI 模式对你有吸引力吗?评论区聊聊~
各位互联网搭子,要是这篇文章成功引起了你的注意,别犹豫,关注、点赞、评论、分享走一波,让我们把这份默契延续下去,一起在前端的海洋里乘风破浪!
💬 本文评论区已开启,但暂无读者留言。
本文转载自微信公众号,如有侵权请联系删除。