Files
EvoBGP/docs/ui-design-contract.md
T
Denozordec 4fc5c96e63
CI / changes (push) Successful in 6s
CI / commitlint (push) Skipped
CI / openapi (push) Skipped
CI / web (push) Successful in 49s
CI / go (push) Successful in 51s
CI / bird2 (push) Successful in 16s
CI / release (push) Successful in 4m12s
refactor: enhance KPI components with variant support and improved layout
Updated the KPI components to include a new KpiStatVariant type for better visual differentiation. Refactored the KpiStatCardBody and KpiStatGrid to utilize this variant, allowing for dynamic styling based on the KPI state. Improved the layout of the KpiStatGrid and its associated components for a more cohesive user experience, including adjustments to the Badge footer presentation.
2026-07-17 17:15:14 +07:00

2.7 KiB

UI Design Contract (ops apps)

Единый контракт для vps-tracker, CFDM и EvoBGP. Surface: ReUI Frame. Kit API: apps/web/src/components/reui-kit/.

Карта: llms.txt · Styling · License · Blocks

Surface

// apps/web/src/lib/ui-surface.ts
export const UI_SURFACE = 'frame' as const

Ops / list / dashboard / detail / settings — только Frame, не shadcn Card как shell. Не смешивать Card и Frame на одном ops-экране.

Canonical PRO references

Зона Block Preview
Shell app-shell-12 (+ cmdk/monitor где нужно) https://reui.io/preview/base/app-shell-12 · https://reui.io/preview/base/app-shell-7
KPI hybrid stats-12 (compact Frame strip: colored icon → value ± variant → label → Badge footer) https://reui.io/preview/base/stats-12
Dashboard dashboard-1 https://reui.io/preview/base/dashboard-1
Lists data-grid-filtering-2 https://reui.io/preview/base/data-grid-filtering-2
Settings settings-16 + SettingRow (settings-7) https://reui.io/preview/base/settings-16 · https://reui.io/preview/base/settings-7
Auth auth-13 https://reui.io/preview/base/auth-13
Empty empty-state-12 https://reui.io/preview/base/empty-state-12
Forms form-7 → Sheet/Drawer https://reui.io/preview/base/form-7

Kit API (reui-kit/)

Component Role
ResourcePage Frame + line tabs + Filters + DataGrid
KpiStatGrid hybrid compact stats-12 KPI tiles (variant, Badge footer)
OpsDashboard KPI + charts + attention queue
SettingsShell settings nav + Outlet
DetailPanel detail Frame sections
filter-utils apply/clear ReUI Filters

MCP workflow

  1. MCP user-reuisearch / get_block / get_component with surface: "frame"
  2. Cite previewUrl + docsUrl
  3. CLI from apps/web: pnpm dlx shadcn@latest add @reui/...
  4. Adapt into kit — do not hand-roll KPI/grid/settings rows
  5. validate_usage / get_audit_checklist

Primitives: MCP plugin-shadcn-shadcn + @evobgp/ui.

Spacing

  • Main: gap-4 md:gap-6, px-4 md:px-6
  • No space-y-* / space-x-* — use flex + gap-*
  • Max 1 primary CTA per screen
  • Semantic tokens only (variant="success"|"info"|"warning") — no raw bg-emerald-*

Forbidden

  • Card as ops list/dashboard shell
  • Hand-rolled data tables when ReUI DataGrid exists
  • Hand-rolled KPI grids when KpiStatGrid exists
  • Mixing Card and Frame surfaces on one ops screen