ui-components
БесплатноБез исполняемых скриптовНе проверенCore component library and design system patterns. Use when building UI, building new components, new page, using design tokens, or working with the component…
от antoncoding★ 22 звезды на GitHubОб этом скилле
Core Components
Component Hierarchy
src/components/
├── ui/ # Design system primitives (Button, Badge, Spinner)
├── shared/ # Cross-feature, business-agnostic components
├── common/ # Common layout components (Modal, TableContainer)
├── layout/ # Layout wrappers (Header, Footer)
└── providers/ # Context providers
Component Location Rules
src/components/ui/ → Pure UI primitives (Button, Badge, Table)
src/components/shared/ → Cross-feature components (TokenIcon, AccountIdentity)
src/features/{name}/ → Feature-specific components
src/modals/ → Global modals (multi-trigger)
Modal
Import: @/components/common/Modal
Always use our custom Modal components. The shared wrapper applies Monarch typography, corner radius, background, blur, and z-index rules automatically.
Modal Systems
| System | Use Case | How It Works |
|---|---|---|
Local useState |
Simple, single-trigger modals | Component controls own visibility |
useModalStore |
Multi-trigger, nested, or chained modals | Zustand store, ModalRenderer in layout |
GlobalModalContext |
Imperative generic modals | Call openModal(<Content />), renders in provider |
GlobalTransactionModals |
Transaction progress | Reactive to useTransactionProcessStore, auto-renders |
Decision:
- Settings, confirmations, forms →
useModalStoreor local state - Transaction progress → Use
useTransactionTracking, modal handled automatically - Dynamic content injection →
GlobalModalContext
import { Modal, ModalHeader, ModalBody, ModalFooter } from '@/components/common/Modal';
import { Button } from '@/components/ui/button';
Standard Modal (settings, workflows)
<Modal
isOpen={isOpen}
onClose={onClose}
variant="standard"
zIndex="settings"
size="xl"
>
<ModalHeader
title="Modal Title"
description="Brief description of what this modal does"
/>
<ModalBody>
{/* Modal content */}
</ModalBody>
<ModalFooter>
<Button variant="secondary" onClick={onClose}>Cancel</Button>
<Button variant="cta" onClick={handleConfirm}>Confirm</Button>
</ModalFooter>
</Modal>
Compact Modal (filters, confirmations)
<Modal
isOpen={isOpen}
onClose={onClose}
variant="compact"
zIndex="base"
size="md"
>
<ModalHeader variant="compact" title="Filter Options" />
<ModalBody variant="compact">
{/* Tighter spacing applied automatically */}
</ModalBody>
<ModalFooter>
<Button variant="secondary" size="sm" onClick={onClose}>Cancel</Button>
<Button variant="cta" size="sm" onClick={handleApply}>Apply</Button>
</ModalFooter>
</Modal>
With Icon
<ModalHeader
title={`Supply ${symbol}`}
description="Supply to earn interest"
icon={<TokenIcon address={tokenAddress} chainId={chainId} symbol={symbol} width={20} height={20} />}
/>
Z-Index Layers
zIndex="base" // z-50 - Standard modals (Supply, Borrow)
zIndex="process" // z-1100 - Process/transaction modals
zIndex="selection" // z-2200 - Market/item selection modals
zIndex="settings" // z-2300 - Settings modals (HIGHEST)
Modal State Patterns
Pattern 1: Local State (Default)
const [showModal, setShowModal] = useState(false);
{showModal && <MyModal isOpen={showModal} onClose={() => setShowModal(false)} />}
Pattern 2: Global State (Zustand)
const { open } = useModalStore();
<Button onClick={() => open('supply', { market, position })}>Supply</Button>
Use Pattern 2 when: multi-trigger (2+ places), props drilling pain, modal chaining, or nested modals.
⚠️ Nested modals must use Pattern 2. Radix-UI crashes with "Maximum update depth exceeded" when multiple Dialogs are mounted simultaneously (#3675). The modal store avoids this by only mounting visible modals.
SectionTag
Import: @/components/landing
A minimal label component for section headers with a technical, bracketed style.
import { SectionTag } from '@/components/landing';
// Basic usage
<SectionTag>Account Access</SectionTag>
// With custom className
<SectionTag className="mb-4">Market Analysis</SectionTag>
Use cases:
- Landing page section labels
Button
Import: @/components/ui/button
import { Button } from '@/components/ui/button';
// Primary - main actions
<Button variant="primary" size="md">New Position</Button>
// Surface - actions in cards, tables
<Button variant="surface" size="sm">Claim</Button>
// Default - navigation
<Button variant="default" size="md">Back to Markets</Button>
// Ghost - icon buttons
<Button variant="ghost" size="icon"><RefreshIcon /></Button>
Variants: primary | surface | default | ghost
Sizes: xs | sm | md | lg | icon
When wrapping Button in Tooltip, wrap it in a <span> to prevent ResizeObserver
Установить ui-components в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ui-components?
Core component library and design system patterns. Use when building UI, building new components, new page, using design tokens, or working with the component library.
Как установить скилл ui-components?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ui-components запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic