极简描述列表

descriptions · minimal · 灵感来源:Refactoring UI(实底面板 + 发丝线)

两列:短字段并排

版本
v2.4.0
环境
production
提交
c8e35bf
负责人
张三

单列:长值不挤

变更摘要
深色模式与设置页滑块,附一套三材质的滑动删除。
回滚方式
发布记录页点「回滚」,回到上一稳定版本。

复用卡

Description List · 极简描述列表 · 描述 / Minimal

规格 · 术语提示词(给 AI 用)

做一个 Description List(极简描述列表):
- 同一份 props(items / columns)
- 实底面板 + 发丝边 + shadow-sm,长值阅读优于玻璃
- 语义仍是 dl / dt / dd
用这些 CSS 变量:--color-divider --color-surface --color-text --color-text-muted --color-text-subtle --shadow-sm --text-2xs
灵感参考:Refactoring UI(实底面板 + 发丝线)

参数(CSS 变量)

--color-divider --color-surface --color-text --color-text-muted --color-text-subtle --shadow-sm --text-2xs

必缺状态

(无必缺状态)

整页场景

(尚未接进整页场景)

安装(一条链接)

调研笔记

极简描述列表

  • 与玻璃描述列表同一份 props(items / columns)
  • 实底 + 发丝边 + --shadow-sm,没有模糊与 inset;长值阅读比玻璃更好
  • 语义仍是 dl / dt / dd,两列只在 sm 以上生效

实现

descriptions/minimal
import { type ReactNode } from 'react';

interface Props {
  items: { label: string; value: ReactNode }[];
  columns?: 1 | 2;
  className?: string;
}

export function MinimalDescriptions({ items, columns = 1, className = '' }: Props) {
  return (
    <dl
      className={`
        grid gap-x-6 gap-y-4 p-5 rounded-md
        bg-[var(--color-surface)] border border-[var(--color-divider)]
        shadow-[var(--shadow-sm)]
        ${columns === 2 ? 'sm:grid-cols-2' : ''}
        ${className}
      `}
    >
      {items.map((item) => (
        <div key={item.label} className="min-w-0">
          <dt className="text-[length:var(--text-2xs)] uppercase tracking-[0.16em] text-[var(--color-text-subtle)]">
            {item.label}
          </dt>
          <dd className="mt-1 text-sm text-[var(--color-text)] break-words">{item.value}</dd>
        </div>
      ))}
    </dl>
  );
}

元信息

标识
descriptions/minimal
状态
done
最后提交
2026-11-01
风格轴
minimal
依赖 token
--color-divider --color-surface --color-text --color-text-muted --color-text-subtle --shadow-sm --text-2xs
在工作台打开 源码与 notes 都在 src/components/descriptions/minimal/