本文へ移動
cccskills
無料GitHub で公開日本語紹介

kortix-ui

Kortix向けのReact画面を既存部品で組み立て、フォームやチャット、通知を実装します。共通の色や余白の設定とブランド変更、表示確認まで案内するスキル。

原文原文の説明を見る

Build React UI with @kortix/ui, the Kortix component library: Kortix Apps, white-label hosts, SDK customer apps and apps/web. Load before you write a component, a page, a chat view or a className in a React host that renders Kortix UI, or when you theme Kortix components for another brand. Covers setup, which component to compose, banned primitives, tokens, status tones, the SessionThread chat recipe, white-label theming and the verify steps.

連携ツールX (Twitter)
インストール方法を見る

こんなときに便利

  • 既存部品でフォームやダイアログ作成
  • SessionThreadでチャットを追加
  • 別ブランドの色やロゴを反映
  • ライト・ダーク・携帯表示の確認

日本語での紹介

できること

@kortix/uiの既存部品を使い、Kortix向けのReact画面を組み立てます。フォーム、ダイアログ、通知、タブなどの用途に合う部品を選び、色や余白を共通設定にそろえます。チャットでは@kortix/sdk/reactのuseSessionとSessionThreadを組み合わせる例を示します。別ブランド向けには、部品を複製せず、CSS変数とロゴ設定で見た目を調整します。

こんなときに便利

Kortix AppsやSDKを使うアプリで画面を追加するとき、既存画面と部品や操作感をそろえたいときに向いています。型チェックに加え、ライト・ダーク表示、携帯幅、各操作の確認手順も扱います。

使い方の例

  • 「既存部品で入力フォームと確認ダイアログを作って」
  • 「SessionThreadでチャット画面を追加して」
  • 「自社ブランドの色とロゴを反映して」

注意点

資料では@kortix/uiはワークスペース内のパッケージで、npm未公開です。外部環境では指定のCSS変数を使い、部品のソースはコピーしません。チャット例には@tanstack/react-queryが必要です。別ブランドの画面ではKortix専用のfonts.cssを読み込みません。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md11.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

@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/sdk/ui. Live catalog: https://kortix.com/design-system.

Availability: a workspace package of kortix-ai/suna ("@kortix/ui": "workspace:*"), not on npm yet. Outside it: tell the user, style with plain CSS over the section 6 variables, never copy component source.

1. Set up once

  1. Styles. A Tailwind v4 host, in its main CSS:
    @import 'tailwindcss';
    @import '@kortix/ui/tailwind.css'; /* tokens, component layer, plugins; @source scans the package */
    
    Install its optional peers tw-animate-css, tailwind-scrollbar, tailwind-scrollbar-hide. A host without Tailwind (plain Vite, a CDN page) imports one file: import '@kortix/ui/styles.css'. It is prebuilt and has every class the package uses. It has no class you write yourself.
  2. Fonts. @kortix/ui/fonts.css (Roobert) is for Kortix-owned surfaces only. A white-label host never imports it and renders the system stack.
  3. Dark mode is the dark class on <html> (useIsDark() reads it). Mount once at the root: UiProvider (strings for translated copy, chat included; link for your router's link; useBrand for an organization's logo), IconProvider (@kortix/ui/icon-provider, the house icon weight; not the icon-set provider of lib/icon-context) and one <Toaster /> from @kortix/ui/toast for the toast helpers.
  4. Import by subpath: import { Modal } from '@kortix/ui/modal'. The root @kortix/ui holds only the light core in section 7. Heavy parts (charts, maps, grids, mermaid, emoji data) load only from their own subpath.

2. Compose before you create

Reuse, then compose, then create. Find the job below before you write a new component.

JobComposeSubpath
Dialog or sheetModal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalFootermodal
Destructive actionConfirmDialog before the mutation, never a single clickconfirm-dialog
Tooltip on an icon buttonHint label="…"hint
Toast after a mutationsuccessToast, errorToast, infoToast, warningToast, loadingToasttoast
Status chipBadge size="sm"badge
Count beside a labelCountBadge (waiting, reminder, conflict, neutral)count-badge
Inline alertInfoBanner tone="…" title="…"info-banner
Pending spinnerLoading (default export)loading
Expand and collapseDisclosure, DisclosureTrigger, DisclosureContentdisclosure
Form fieldField, FieldLabel, FieldGroup, FieldDescription with Input, Textarea, Selectfield
Search fieldInputGroupSearch, InputGroupSearchInputinput-group
PanelCard and its slots, or bg-popover rounded-md border px-4 py-5card
Buttons side by sideButtonGroupbutton-group
Tabs and filtersTabs, TabsList, TabsListCompacttabs
Menu, picker, paletteDropdownMenu, Popover, Commanddropdown-menu, popover, command
Table and empty listTable; Empty with one muted linetable, empty

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

3. Banned

NeverUse
Dialog / DialogContent in feature codeModal
Tooltip primitives in feature codeHint
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, SpinnerIconLoading
A hand-rolled chip <span> or a colored bannerBadge, InfoBanner
SectionCard, List / ListRowCard, <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 componentthe component as it ships; theme with tokens (section 6)

4. Tokens only

  • Colors are semantic utilities: bg-background, bg-card, bg-popover, bg-muted, text-foreground, text-muted-foreground, border-border, bg-primary, text-destructive. Never a hex, rgb(), oklch() or a Tailwind palette class (text-emerald-600).
  • --spacing is 0.23rem: the scale is 8% tighter than stock Tailwind. A 16px mockup gap is gap-4, never gap-[16px].
  • Radius: rounded-md for panels and fields. Elevation is for overlays only; in-flow panels are flat.
  • Motion: none by default. Hover is transition-colors duration-fast. Nothing over 300 ms in product UI.

5. Status tones

One meaning per hue. StatusTone (@kortix/ui/status) is success, warning, destructive, info, neutral. InfoBanner takes tone; StatusBadge and STATUS_DOT render it. Badge variants map the same meanings: success, warning, destructive, info, muted. Brand hues for a tinted icon tile: bg-kortix-green/15, bg-kortix-orange/15, bg-kortix-blue/15, with the icon in the full hue.

6. White-label

Override the CSS variables of tokens.css in your own :root and .dark. --kortix-blue is the accent (checked Switch / Checkbox / RadioGroup, brand Button, info Badge / InfoBanner); --ring the focus ring (--sidebar-ring and the --sidebar-primary selection follow it); --foreground / --background the page and the default Button; --primary (ink, not the accent) Progress, Slider, menu tint; plus --radius, --font-sans-system. Pass the organization's marks to UiProvider useBrand, so KortixLogo renders them. Never fork a component, never load fonts.css, never edit a generated file.

7. Components

Import fromNames
@kortix/ui (adapters)cn, UiProvider, defaultUiStrings, defaultChatStrings, useUiStrings, useUiLink, useUiBrand, UiStrings, UiStringsInput, ChatStrings, UiLinkProps, UiLinkComponent, UiBrand, UseUiBrand, useIsDark
@kortix/ui (actions, display)Button, buttonVariants, ButtonProps, Badge, badgeVariants, Card, CardAction, CardButton, CardContent, CardDescription, CardEyebrow, CardFeature, CardFooter, CardGroup, CardHeader, CardImage, CardMedia, CardTitle, CardButtonProps, CardButtonSize, CardButtonVariant, CardGroupProps, CardLogo, CardProps, Separator, Skeleton
@kortix/ui (forms)Input, inputFocusClasses, inputInvalidClasses, inputSurfaceClasses, inputTransitionClasses, InputProps, useAutosizeTextArea, Textarea, AutosizeTextAreaRef, AutosizeTextAreaProps, Label, Checkbox, CheckboxProps, CheckboxVariant, Switch, SwitchProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectTriggerProps
@kortix/ui (overlays)Modal, ModalBody, ModalClose, ModalContent, ModalContentInner, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Hint, HintProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger
@kortix/ui (primitives, not for feature code: section 3)Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger
@kortix/ui (navigation)FilterBar, FilterBarItem, Tabs, TabsContent, TabsList, TabsListCompact, TabsTrigger, TabsTriggerCompact, tabsTriggerHeightVariants, tabsTriggerPaddingVariants, tabsTriggerTextVariants, TabsListType, TabsSize, TabsTriggerSize, TabsTriggerVariant, TabsUnderlineSize
@kortix/ui (conversation)Bubble, BubbleContent, BubbleGroup, BubbleReactions, bubbleVariants, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, Marker, MarkerContent, MarkerIcon, markerVariants
@kortix/ui/chat (whole thread)SessionThread, SessionThreadProps, SessionPickers, MessageList, DefaultEmptyState
@kortix/ui/chat (one message)MessageView, MessageRenderers, RenderTool, ToolCall, Markdown, userMessageParts
@kortix/ui/chat (input)Composer, ComposerCommand, parseCommand, slashQuery, ModelPicker, filterModels, AgentPicker
@kortix/ui/chat (prompts, errors)PermissionPrompt, PermissionDecision, QuestionPrompt, ChatErrorHandler, sendFailureTitle
@kortix/ui/chat (streaming)streamingMarkdown, holdBackFenceOpener, closeUnterminatedCodeFence, holdBackTableHeader

Every other component is one subpath per file: @kortix/ui/<file name> (@kortix/ui/dot-matrix/<name> for the dot matrices), plus @kortix/ui/lib/<name>, @kortix/ui/hooks/<name> and @kortix/ui/icons/<name>.

8. Chat recipe

import { useSession } from '@kortix/sdk/react';
import { SessionThread } from '@kortix/ui/chat';
import { errorToast } from '@kortix/ui/toast';

export function Chat({ projectId, sessionId }: { projectId: string; sessionId: string }) {
  const session = useSession(projectId, sessionId);
  return <div className="h-dvh"><SessionThread session={session} onError={(m) => errorToast(m)} /></div>;
}
  • Needs @tanstack/react-query and one QueryClientProvider. The parent sets the height. Slots: composerToolbar, composerFooter, emptyState; renderTool (undefined keeps the default), renderers.
  • A layout of your own composes MessageList, MessageView, Composer and the prompts from the same useSession result. Never write a second transport or a raw fetch.
  • A fully custom transcript uses renderParts from @kortix/sdk/react (docs: /docs/sdk/react).

9. Verify

  1. Types: tsc --noEmit in the host adds no error.
  2. Run the page in a browser in light and dark, at 720 × 480 and at a phone width. Click every control.
  3. Search your diff: no hex or rgb(, no -[ spacing bracket, no lucide-react, no toast(, no animate-spin. Kortix-internal: .agents/skills/kortix-brand/scripts/audit.sh <paths> is clean.
  4. White-label: change --kortix-blue and --ring in :root; a checked Switch and focus rings follow.

10. Kortix-internal work

In kortix-ai/suna, these skills are the law and win over this file:

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

access-policy

無料概要あり

Slackのアクセス申請をOktaの役職・所属情報と照合し、GitHubやAWS IAMで必要な範囲の権限を準備します。有資格者の承認後に適用し、履歴を記録します。

  • SlackからGitHub権限の申請を確認
  • 作業に必要なAWS IAM権限の準備
  • 慎重な審査が必要な申請の振り分け
kortix-ai/suna2万2026年10月19日 更新

account-research

無料概要あり

営業連絡や商談の前に企業・人物を調べ、事業概要、直近のニュース、採用動向、主要人物を整理します。情報源を添えて、会話の切り口や確認すべき質問までまとめます。

  • 営業連絡前の見込み客調査
  • 商談参加者の背景を知りたいとき
  • 競合の製品や立ち位置の比較
kortix-ai/suna2万2026年10月19日 更新

ad-performance-review

無料概要あり

Google AdsとMeta Adsの広告実績を読み取り、予算消化の偏りや成果の悪化、異常値を確認し、数値と優先順位を添えた改善提案にまとめます。

  • 広告予算の消化ペースを確認したいとき
  • 獲得単価や広告収益の悪化を調べたいとき
  • 成果のない広告やキーワードの洗い出し
kortix-ai/suna2万2026年10月19日 更新

agent-browser

無料概要あり

Webサイトの移動やフォーム入力、クリック、画像保存、データ抽出をエージェントに任せるスキルです。画面操作の自動化やWebアプリの動作確認に使えます。

  • フォーム入力やページ移動の自動化
  • 画面保存とページ内データの抽出
  • Webアプリの不具合を探したいとき
kortix-ai/suna2万2026年10月19日 更新

ap-invoice-match

無料概要あり

メールで届く請求書を発注書・台帳と照合し、重複や過大請求、発注書の欠落を記録するスキル。確認理由を添えてSlackにまとめ、人の承認につなげます。

  • 新着請求書を発注書と照合したいとき
  • 請求書の重複や再送を調べたいとき
  • 単価や発注残額の超過を確認したいとき
kortix-ai/suna2万2026年10月19日 更新

billing

無料概要あり

Kortixの料金プラン、クレジット、試用、法人契約の仕様と関連コードの場所を整理し、課金処理や管理画面、料金表示を変更する際の実装ルールを示します。

  • 課金ロジックと仕様の更新
  • 試用や法人契約の扱いを確認したいとき
  • 料金や利用枠の定義元の確認
kortix-ai/suna2万2026年10月19日 更新

kortix-ai のスキルをすべて見る

このスキルの問題を報告する