Show HN:滑动面板 React UI 库(灵感来自 WebOS Enyo)
Show HN: Sliding-panes React UI library (inspired by WebOS Enyo)

原始链接: https://vcarl.com/sashay/

界面采用响应式面板布局,分隔条吸附到简单分数,使布局在各种屏幕尺寸下都保持合理。分隔条可拖动或抛掷,释放速度决定惯性,而慢速拖动则精确落位。每个面板可包含用于筛选、设置或内容的底部栏,可展开覆盖面板并在移动端工作。深度导航栈会将不再容纳的面板折叠成带标签的细脊柱,即使深度很大也保持交互成本不变。打开的面板、宽度和打开的栏被编码为简短的 URL 代码,可精确分享并由他人重新打开布局。

Hacker News 展示了一个名为“Sliding-panes”的 Show HN 帖子,这是一个受 WebOS Enyo 启发的 React UI 库,获得 37 分和 8 条评论。创建者 vcarl 表示它主要为自己制作,核心是原生 Web,外层有薄薄的 React 封装,因此其他人可按需适配。评论者称赞其设计和响应式处理,也有部分人表达对 React 的不喜欢。vcarl 回应说 React 对他而言并未衰落,并指出有核心的“逃生舱口”。其他评论称赞其专注、有用的产出,并调侃它是凭感觉编写的但打包良好。总体上,帖子介绍了一个 sliding-panes UI 库,并引发了关于 React 与原生 JS 以及 AI 生成产品膨胀的讨论。
相关文章

原文

Snaps to simple fractions.

Dividers rest on fractions with a denominator up to six, so a layout saved on a laptop still makes sense on a monitor. The grid gets finer as the frame gets wider.

Guide: Your first frame →

Throw it.

A quick throw carries the divider one or two snaps past where you let go. Release speed is read from the last 90 ms, so a slow drag still lands exactly where you put it.

Guide: Your first frame →

A bar for each pane.

Any pane can have a bar at its bottom for filters, settings or a table of contents. It expands over the pane and works the same on a phone.

Guide: Bottom bars →

Deep stacks fold into a spine.

Drill down as far as you like. Panes that no longer fit fold into a slim spine, with a tab for each. Drag cost stays flat at a thousand deep.

Guide: Navigation stacks →

Deep linked pane arrangements

Which panes are open, how wide they are, and which bars are open all fit in a short code you can keep in the URL. Share the link and the other person sees the same arrangement.

Guide: Layout in the URL →
联系我们 contact @ memedata.com