← 返回列表
全部 Skill›内容与媒体 Content & Media›anywhere-ui

anywhere-ui

作者 @anywhere-labs · 语言 en
Design system rules, token discipline, geometry, typography, controls, content copywriting, TanStack Query guardrails, ViewTransition motion, and shadcn registry usage for Anywhere Labs web consoles and admin dashboards.
内容与媒体 Content & Media设计通用执行命令待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
3,744
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Anywhere UI Design System

Use this skill whenever creating or modifying web interfaces styled with Anywhere UI (Next.js + Tailwind CSS v4 + Base UI + shadcn). Full human-readable specification: docs/design-system.md (中文) / docs/design-system.en.md (English).

1. Visual Philosophy & Surface Hierarchy

Anywhere UI is a calm, monochrome, dark-first console aesthetic (dark is the default theme; light is a full first-class sibling):

  • Never hard-code hex colors in .tsx files. Always use semantic CSS variable utilities (bg-background, bg-card, bg-surface-raised, bg-surface-hover, bg-secondary, bg-popover, text-foreground, text-foreground-secondary, text-muted-foreground, border-border, border-border-strong).
  • Dark palette:
  • Canvas --background: #000000 (pure black)
  • Borderless card --card: #141414
  • Raised surface / popover / sidebar active --surface-raised / --popover / --sidebar-accent: #191919
  • Hover surface --surface-hover / --accent: #252525
  • Secondary pill / active tile --secondary: #262626
  • Wireframe border --border-strong: #303030
  • Light palette:
  • Canvas --background: oklch(1 0 0) (#ffffff)
  • Borderless card --card: #f3f3f3
  • Raised surface --surface-raised: #ececec
  • Secondary / hover --secondary / --surface-hover: #e4e4e4
  • Sidebar canvas --sidebar: oklch(0.985 0 0)
  • Sidebar active pill --sidebar-accent: oklch(0.92 0 0) (keeps clear contrast on #fafafa sidebar)
  • Borderless surfaces:
  • Cards (rounded-card bg-card), theme selection tiles (rounded-2xl bg-card), nested value panels (rounded-xl bg-background inside bg-card), and user avatars (UserAvatar) are borderless — separated by tonal steps, never heavy borders.
  • Standalone icons are borderless: never wrap a lone status/empty-state/hero icon inside a gray circular or square container (rounded-full bg-surface-raised). Render the icon cleanly at size-6–size-8 stroke-[1.5] text-muted-foreground (or text-destructive / text-success).
  • Icon-only action buttons (pagination arrows, table row actions, copy button, mobile drawer trigger) use variant="ghost" (size="icon-sm" or size="icon-xs"), never boxed outlines.

2. Typography (Mixed Latin + CJK)

  • English / Latin / digits: keep the native system stack — "SF Pro Text" / "SF Pro Display" on Apple, "Segoe UI" on Windows.
  • Chinese (Simplified Chinese / CJK punctuation): use self-hosted variable HarmonyOS Sans SC (@luzixu/harmonyos-sans, variable weight 40 900), loaded via app/harmonyos-sans-sc.css containing only the CJK/punctuation WOFF2 subsets (sc-*) and omitting the Latin font-text-* slice.
  • Place "HarmonyOS Sans SC" before "SF Pro Text" / -apple-system in --font-sans and --font-display:
  • ASCII/Latin glyphs do not match "HarmonyOS Sans SC"'s unicode-range, so English falls straight through to native SF Pro / Segoe UI (and pure English pages download 0 bytes of CJK fonts).
  • Chinese glyphs match "HarmonyOS Sans SC" immediately, preventing macOS -apple-system from intercepting CJK with PingFang SC.
  • Monospace discipline (font-mono): reserve strictly for operator/developer identifiers (admin claim keys, client IDs, slugs, callback URIs, JSON editors, CopyableValue). Use tabular-nums for all quotas, counts, pagination indices, and timestamps.

3. Two-Tier Corner Geometry (corner-shape)

  • Base radius scale: --radius: 0.75rem (12px), --radius-card-max: 32px, --radius-card: min(var(--radius-4xl), var(--radius-card-max)) (~31.2px).
  • Under @supports (corner-shape: superellipse(1.35)):
  1. Multi-line rounded rectangles (cards, dialogs, popovers, multi-item menus, textareas, tiles, card skeletons) use corner-shape: superellipse(1.35) (subtle G2-continuous smoothing — never boxy squircle / superellipse(2)).
  2. Circles & capsules/pills ([class*="rounded-full"], button, input, single-line input-group, badge, switch, switch-thumb, sidebar-menu-button, pill tabs-list/tabs-trigger, user-avatar, avatar, radio-group-*) MUST remain strictly corner-shape: round. Symmetric superellipse(K > 1) flattens vertical capsule end-caps into rounded rectangles.
  3. **Never write [class*="-full"]** in CSS selectors — it accidentally matches w-full and h-full. Always write [class*="rounded-full"].
  • Skeleton defaults to rounded-card (override to rounded-full for single-line text/button skeletons and rounded-2xl for table row skeletons).

4. Controls & Information Display Patterns

  • Pill Buttons (components/ui/button.tsx):
  • Two primary visual hierarchies:
  • Emphasized: variant="default" (bg-foreground text-background) — solid high-contrast pill for the single primary action.
  • Non-emphasized wireframe: variant="outline" (border-border-strong bg-transparent text-foreground hover:bg-surface-raised) — calm pill for secondary actions and quick-filter chips.
  • Optical pill padding: sm = h-8 px-4, default = h-9 px-4, lg = h-10 px-5, matching Input (h-9 px-4) and Badge (h-5 px-2.5).
  • Use nativeButton={false} whenever passing render={<Link ... />} to Base UI Button.
  • Pill-in-Pill Switch (components/ui/switch.tsx, adapted from shadcn base-luma):
  • 44×20 track (h-5 w-11) with 24×16 pill thumb (h-4 w-6, checked translate translate-x-[calc(100%-8px)]).
  • Checked/unchecked contrast on pure black dark canvas: checked track bg-foreground, checked thumb bg-background dark:bg-secondary; unchecked track bg-input dark:bg-surface-raised, unchecke
评论
Aanywhere-labs
anywhere-labs
anywhere-labs/agents-anywhere
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@anywhere-labs
所属大类内容与媒体 Content & Media / 设计
国内可用性通用
最近源活动—
风险提示执行命令
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。