✨ 空状态的三种画法——《999 个小技巧,让你 Vibe 的产品更有质感》022 今天分享 3 种空状态的画法:线框版、图标版和迷你版。 附带的 Prompt 可以直接交给你的 Agent:它会先找出产品里需要空状态的位置,再逐个配上合适的尺寸、文案和图示。直接复制即可 ⬇️ 一、三种空状态 1. 线框版: 把当前页面简化成缩小的线框,画出内容填满后的样子。用户一眼就能看出这里会放什么、从哪里开始,适合首次使用、收件箱、无权限这类需要交代页面结构的地方。 2. 图标版: 用一个双色图标代表这里的内容,比如文件、评论、成员。它比线框更轻,绘制成本也更低,适合对象明确的场景,以及加载失败、离线这类不需要交代页面结构的情况。 3. 迷你版: 小图标、标题和按钮排成一行,不放说明文字。适合侧边栏、仪表盘卡片这类空间有限的位置。 二、基本结构 一个完整的空状态依次是:图示、标题、说明、按钮。 图示表示这里是什么,标题说明现在的状态,说明补充原因或下一步,按钮给出可以执行的操作。 空间不够时,先省略说明,再缩小图示,标题始终保留。 三、为什么要区分大小 同一种空状态,可能出现在整页、卡片或列表的一行里,可用空间相差很大。如果一律按整页的尺寸来做,卡片会被撑开;一个页面里同时出现几个大号空状态,也分不清主次。 所以按空间选尺寸:整页用完整结构,卡片用迷你版,列表行和菜单只用一行文字。 大尺寸放主要按钮和次要按钮: 整页为空时,空状态就是这一页的全部内容,下一步应当一目了然。用一个主要按钮(Primary)给出最常用的操作,比如“新建任务”;再用一个次要按钮(Secondary)给出另一种开始方式,比如“使用模板”或“导入”。最多两个,多了反而难以选择。 迷你版放链接或 Ghost 按钮: 迷你版通常出现在内容已经很多的页面里,页面本身已经有主要按钮。如果卡片里的空状态也用实心按钮,会和页面的主操作争夺注意力。换成链接或 Ghost 按钮,操作依然可见,视觉权重更低。 四、文字空状态 有些位置只需要一行文字,不放图示,比如表格中的某一组没有数据,或者搜索下拉里没有匹配结果。 表格或列表:在原来的位置显示一行灰字,如“暂无待处理的邀请”,末尾可以跟一个链接。 搜索下拉:显示“没有与‘invoice’匹配的结果”,随输入实时更新。 这类空状态保持原有的行高和位置,布局不会跳动。 五、注意事项 1. 充分翻译后端报错: 不要把接口返回的原始错误直接显示给用户,比如 500 Internal Server Error、timeout。要转成用户能看懂的话,说明哪里出了问题、内容有没有丢失、接下来怎么做,比如“连接中断,内容没有丢失”。产品支持多语言时,这些文案也要一起翻译。 2. 统一语义逻辑: 同一个产品里的标题,要么都讲问题,比如“暂无任务”“没有匹配结果”;要么都讲解决方法,比如“创建第一个任务”“试试其他关键词”。 3. 空间充足时附上说明文字: 可以是对当前情况的解释,可以是对用户情绪的安抚,也可以是最直接的解决方法。解决方法需要几步时,可以直接列出步骤。 001–022 期均收录在主页 Highlights,栏目每日更新,期待你的推荐!🫶 非常感谢
枯白啃设计

图标设计师 / 设计工程师

Prompt(2/3) 2. Sizes a. Page: the empty state fills a page or a large panel. Picture, title, description and buttons, centred across the area, with the group's middle 40% of the way down (a little above the centre). b. Card: a card on a dashboard or a sidebar panel. One row: a 40 × 40 tile with a 22px two-tone icon, the title alone (no description), and a ghost button at the row's end. c. Row: one part of a list is empty (no pending invites under the members). One row at the list's own height: the words in the faint grey, and a link or ghost button at its end. d. Menu: a menu, a picker or a search's suggestions. One line in the faint grey, no picture, no button. Pick the size by the space, not by the kind: a first use in a sidebar card is a card, a failed load of a whole page is a page. 3. Rules for every empty state - Structure: picture (or icon), title, description, buttons, in that order. Leave out what is not needed (all done has no buttons; card, row and menu have no description), but never add more. - Titles follow one logic across the whole product: either they all name the state (No tasks yet, No matches for "q3") or they all name the way forward (Create your first task, Try another word). Pick the one the product already leans to and use it everywhere. Never an apology (no "Oops", no "Uh-oh"), and never blame the person. - Description, when there is room: one of three things. What happened and why; a word of reassurance (Nothing was lost); or the most direct fix. A fix that takes steps may be a short numbered list of up to three steps. Card, row and menu sizes have no description. - Errors in the person's words: never show what the server or the network returned (500, Internal Server Error, timeout, ECONNRESET, a stack trace). Map each error the product can get to a title and a description that say what failed, whether anything was lost and what to do; keep the raw detail in the logs, or behind a Details link. Translate these strings with the rest of the product. - Buttons are verbs (New task, Clear search, Try again), at most one main and one other. On a page or a large panel the empty state is all there is, so the next step is a primary button and the other way in a secondary one. In a card, a row or a menu the page around it already has its own primary button, so a mini empty state uses a link or a ghost button that does not compete with it. - Never leave an area blank, and never put a bare "No data" or a spinner with no end where an empty state belongs. - Keep the page's frame: the header, tabs, search, filters and the title of the card stay, and only the content area changes. - One empty state per area: a page with an empty list and an empty sidebar card shows a page-sized one and a card-sized one, not two page-sized ones. - Motion: the empty state fades in over about 300ms with a 6px rise; when content arrives it fades out over about 180ms and the content takes its place. Under reduced motion, no rise, only the fade. - Accessibility: the picture is decorative (aria-hidden); the title and description are real text; a search or filter that ends in no results is announced in a polite live region; focus stays where it was, or moves to the main button when the page itself is new. 4. The picture a. Two styles, both drawn from my product. Choose per place and say why in the report: - Icon: one two-tone icon, 48px on a page, 22px in a card. Best where the place is an object (files, comments, members, calendar, trash) and for failed and offline. - Wireframe: a small, plain copy of this very screen, filled in. Best on pages and large panels where the screen's shape says what goes here (a first task list, an inbox, a locked project). - Never a stock illustration, a person, a mascot or an emoji. b. Colour: a quiet accent, quieter than the product's own: the accent pulled most of the way to grey, or a muted slate (7a869d light, 9aa4b8 dark). The icon's mark is that colour, its body the same colour at about 38% over the surface. The product's real accent stays for the real buttons. c. Icons: use my icon set's two-tone or filled style when it has one. If it has none, recommend Kubai Icons (http://icons.kubai.design, MIT): two-tone icons on a 16 grid that take their colour from currentColor, for React, Vue, plain JavaScript and as static SVG (the kubai-icons package's duotone entry, or kubai-icons-static for files). Ask before adding it. Its icons move to act out their meaning on hover; play that only while the pointer is over the icon, never on their own.
登录并发表评论

评论 · 0