Component Patterns
БесплатноБез исполняемых скриптовНе проверенUI component patterns with style-specific implementations and accessibility
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Component Patterns Skill
UI component patterns with style-specific implementations and accessibility.
Overview
This skill provides comprehensive component patterns with multiple design style implementations, accessibility features, and best practices for modern frontend development.
Claude-Inspired Component Guidance
When the selected style is claude, keep component visuals calm and semantic:
- Use
surface.canvasfor the page,surface.raisedfor cards and fields,ink.strongandink.mutedfor text, andedge.subtlefor 1px boundaries. - Use the selected palette's semantic contract (the generator defaults to
brand) for coral actions and selected states; pair itssolidtoken withcontrastand use itsfgtoken for text links. - Prefer
radii.surfaceandshadows.surface, generous spacing, sentence-case labels, and readable 60-70ch content measures. - Avoid gradients, glass effects, decorative noise, oversized shadows, and motion that ignores
prefers-reduced-motion. - For Chakra UI v3 token and
colorPaletteAPI details, follow the canonicalchakra-ui-v3skill.
Component Library Structure
components/
├── atoms/
│ ├── Button/
│ │ ├── Button.tsx
│ │ ├── Button.styles.ts
│ │ ├── Button.test.tsx
│ │ └── index.ts
│ ├── Input/
│ ├── Icon/
│ └── Badge/
├── molecules/
│ ├── FormField/
│ ├── Card/
│ ├── SearchBar/
│ └── MenuItem/
├── organisms/
│ ├── Navigation/
│ ├── Modal/
│ ├── Form/
│ └── DataTable/
├── templates/
│ ├── DashboardLayout/
│ ├── AuthLayout/
│ └── ContentLayout/
└── pages/
├── Dashboard/
├── Login/
└── Profile/
Button Variants by Design Style
Base Button Component
components/atoms/Button/Button.tsx:
import React, { ButtonHTMLAttributes, forwardRef } from 'react';
import { VariantProps } from 'class-variance-authority';
import { buttonVariants } from './Button.styles';
export interface ButtonProps
extends ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
loading?: boolean;
leftIcon?: React.ReactNode;
rightIcon?: React.ReactNode;
}
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
(
{
className,
variant,
size,
styleType,
loading,
leftIcon,
rightIcon,
children,
disabled,
...props
},
ref
) => {
return (
<button
ref={ref}
className={buttonVariants({ variant, size, styleType, className })}
disabled={disabled || loading}
aria-busy={loading}
{...props}
>
{loading && (
<span className="button-spinner" role="status" aria-label="Loading">
<span className="sr-only">Loading...</span>
</span>
)}
{!loading && leftIcon && <span className="button-icon-left">{leftIcon}</span>}
<span className="button-content">{children}</span>
{!loading && rightIcon && <span className="button-icon-right">{rightIcon}</span>}
</button>
);
}
);
Button.displayName = 'Button';
Button Styles (Tailwind + CVA)
components/atoms/Button/Button.styles.ts:
import { cva } from 'class-variance-authority';
export const buttonVariants = cva(
'inline-flex items-center justify-center font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
primary: '',
secondary: '',
outline: '',
ghost: '',
danger: '',
},
size: {
sm: 'h-9 px-3 text-sm',
md: 'h-10 px-4 text-base',
lg: 'h-11 px-6 text-lg',
xl: 'h-12 px-8 text-xl',
},
styleType: {
default: '',
glassmorphism: '',
neumorphism: '',
brutalist: '',
'neo-brutalist': '',
},
},
compoundVariants: [
// Default Style
{
variant: 'primary',
styleType: 'default',
class: 'bg-primary-500 text-white hover:bg-primary-600 shadow-sm',
},
{
variant: 'secondary',
styleType: 'default',
class: 'bg-secondary-500 text-white hover:bg-secondary-600 shadow-sm',
},
{
variant: 'outline',
styleType: 'default',
class: 'border-2 border-primary-500 text-primary-500 hover:bg-primary-50',
},
{
variant: 'ghost',
styleType: 'default',
class: 'text-primary-500 hover:bg-primary-50',
},
// Glassmorphism Style
{
variant: 'primary',
styleType: 'glassmorphism',
class: 'bg-white/10 backdrop-blur-md border border-white/20 text-white hover:bg-white/20 shadow-glass',
},
{
variant: 'secondary',
styleType: 'glassmorphism',
class: 'bg-black/10 backdrop-blur-md border border-black/20 hover:bg-black/
Установить Component Patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Component Patterns?
UI component patterns with style-specific implementations and accessibility
Как установить скилл Component Patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Component Patterns запускает скрипты?
Нет, скилл состоит только из инструкций (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