跳到正文
Skillpedia
界面(UI/UX)20k · #10387

kortix-ui

它能做什么

这项技能指导 AI 使用 @kortix/ui React 库构建界面,例如聊天视图、会话工作区和仪表盘。适合构建 Kortix 风格应用或自定义仪表盘的开发人员。

适用场景

  • ✓你使用 @kortix/ui 库构建 React 页面或组件的时候。
  • ✓你想要与 Kortix 风格一致的聊天或会话视图的时候。
  • ✓你构建连接到 Kortix SDK 的自定义仪表盘的时候。

技能链接

https://github.com/kortix-ai/suna/blob/dev/packages/ui/skills/kortix-ui/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kortix-ai/suna/blob/dev/packages/ui/skills/kortix-ui/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请使用 @kortix/ui 构建一个 React 页面,包含聊天视图和项目侧边栏。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会一次性设置样式和 provider,然后组合现成的组件,而不是自己编写。它会按照库的指南处理每个部分。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

@kortix/ui

@kortix/ui is the one React component library for every Kortix surface: apps/web, Kortix Apps, the white-label demo and SDK customer apps. Components are Tailwind v4 class strings that read CSS variables. Docs: https://kortix.com/docs/developers#kortix-ui. Live catalog: https://kortix.com/design-system.

Install: npm i @kortix/ui @kortix/sdk, the same version of each (peers: references/custom-dashboard.md). Module entries and @kortix/ui/theme need 0.14.4+. Inside kortix-ai/suna: "workspace:*". Never copy component source.

1. Set up once

  1. Styles. A Tailwind v4 host: @import 'tailwindcss'; @import '@kortix/ui/tailwind.css'; in its main CSS, plus the optional peers tw-animate-css, tailwind-scrollbar, tailwind-scrollbar-hide. A host without Tailwind imports @kortix/ui/styles.css once: every class the package uses, none of yours.
  2. Fonts. @kortix/ui/fonts.css (Roobert) is for Kortix-owned surfaces only. A white-label host never imports it.
  3. Mount once at the root: QueryClientProvider, UiProvider (link, navigation: your router, observesHistory: true under Next.js; components: host slots, a missing slot hides its control; config: managedModelsEnabled, connectorsEnabled, terminalEnabled, cliConnectEnabled, publicSharesEnabled, commandPaletteShortcut, settingsShortcut, accountApiEnabled; resolvePreviewUrl; useBrand: your marks; i18n, strings, image, useViewerId: without it no sender name or "Stopped by" shows), IconProvider (@kortix/ui/icon-provider), one <Toaster /> (@kortix/ui/toast). setUiTelemetry (@kortix/ui) once at module load. Dark mode is dark on <html>. SDK billingEnabled stays off (Kortix's app only).
  4. Ids, never route params. SessionThread, SessionWorkspace and ProjectHome mount SessionIdsProvider and the SDK project scope themselves. A block outside them: KortixProjectProvider (@kortix/sdk/react) and SessionIdsProvider (projectId, sessionId) around it. Links follow setUiRoutes (@kortix/ui): map each page you do not serve to null.
  5. Import by subpath: import { Modal } from '@kortix/ui/modal'. The root @kortix/ui (section 7) needs no @kortix/sdk.

2. Compose before you create

Job Compose Subpath
Dialog or sheet Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalFooter modal
Destructive action ConfirmDialog before the mutation, never a single click confirm-dialog
Tooltip on an icon button Hint label="…" hint
Toast after a mutation successToast, errorToast, infoToast, warningToast, loadingToast toast
Status chip; count beside a label Badge size="sm"; CountBadge (waiting, reminder, conflict, neutral) badge, count-badge
Inline alert InfoBanner tone="…" title="…" info-banner
Pending spinner Loading (default export) loading
Expand and collapse Disclosure, DisclosureTrigger, DisclosureContent disclosure
Form field; search field Field, FieldLabel, FieldGroup, FieldDescription with Input, Textarea, Select; InputGroupSearch field, input-group
Panel; buttons side by side Card and its slots, or bg-popover rounded-md border px-4 py-5; ButtonGroup card, button-group
Tabs and filters Tabs, TabsList, TabsListCompact tabs
Menu, picker, palette DropdownMenu, Popover, Command dropdown-menu, popover, command
Table and empty list Table; Empty with one muted line table, empty

A new primitive is the last step: tokens only, a small API, and a section on /design-system.

3. Banned

Never Use
Dialog / DialogContent in feature code Modal
Tooltip primitives in feature code Hint
toast() from sonner, toast.success() the toast helpers and <Toaster />, all from @kortix/ui/toast; a host needs no sonner import
An icon with animate-spin, CircleNotchIcon, SpinnerIcon Loading
A hand-rolled chip <span> or a colored banner Badge, InfoBanner
SectionCard, List / ListRow Card, <ul className="space-y-2"> rows
lucide-react or another icon set @phosphor-icons/react, *Icon names, no weight prop (only weight="fill" for solid status glyphs)
A fork or a restyled copy of a component the component as it ships; the
常见问题

我需要 Tailwind 吗?

该包的样式是为 Tailwind v4 构建的。如果不使用 Tailwind,技能要求只需导入一次完整的样式文件。

我应该复制组件代码吗?

不应该。技能要求安装该包,绝不复制其组件源代码。

它只适用于 Kortix 的产品吗?

它是为 Kortix 界面构建的,但安装了它的自定义仪表盘和白标应用也可以使用。

详情

作者的原始描述

Build React UI with @kortix/ui, the Kortix component library and the whole Kortix session experience as modules (session workspace, thread, composer, side panel, files, file viewer, terminal, project sidebar and home, customize pages): Kortix Apps, white-label hosts, custom dashboards on @kortix/sdk and apps/web. Load before you write a component, a page, a chat or session view, a custom dashboard or App, or a className in a React host that renders Kortix UI, or when you theme Kortix components for another brand. Covers setup, the module map, which component to compose, banned primitives, toke

repo: kortix-ai/suna

热度

GitHub 星标
20k
排名
#10387
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能