atomic-design-atoms
БесплатноБез исполняемых скриптовНе проверенUse when creating atomic-level UI components like buttons, inputs, labels, and icons. The smallest building blocks of a design system.
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
Atomic Design: Atoms
Master the creation of atomic components - the fundamental, indivisible building blocks of your design system. Atoms are the smallest functional units that cannot be broken down further without losing meaning.
What Are Atoms?
Atoms are the basic UI elements that serve as the foundation for everything else in your design system. They are:
- Indivisible: Cannot be broken down into smaller functional units
- Reusable: Used throughout the application in various contexts
- Stateless: Typically controlled by parent components
- Styled: Implement design tokens for consistent appearance
- Accessible: Built with a11y in mind from the start
Common Atom Types
Interactive Atoms
- Buttons
- Links
- Inputs (text, checkbox, radio, select)
- Toggles/Switches
- Sliders
Display Atoms
- Typography (headings, paragraphs, labels)
- Icons
- Images/Avatars
- Badges/Tags
- Dividers
- Spinners/Loaders
Form Atoms
- Input fields
- Textareas
- Checkboxes
- Radio buttons
- Select dropdowns
- Labels
Button Atom Example
Basic Implementation
// atoms/Button/Button.tsx
import React from 'react';
import type { ButtonHTMLAttributes } from 'react';
import styles from './Button.module.css';
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger';
export type ButtonSize = 'sm' | 'md' | 'lg';
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
/** Visual style variant */
variant?: ButtonVariant;
/** Size of the button */
size?: ButtonSize;
/** Full width button */
fullWidth?: boolean;
/** Loading state */
isLoading?: boolean;
/** Left icon */
leftIcon?: React.ReactNode;
/** Right icon */
rightIcon?: React.ReactNode;
}
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
(
{
variant = 'primary',
size = 'md',
fullWidth = false,
isLoading = false,
leftIcon,
rightIcon,
disabled,
children,
className,
...props
},
ref
) => {
const classNames = [
styles.button,
styles[variant],
styles[size],
fullWidth && styles.fullWidth,
isLoading && styles.loading,
className,
]
.filter(Boolean)
.join(' ');
return (
<button
ref={ref}
className={classNames}
disabled={disabled || isLoading}
aria-busy={isLoading}
{...props}
>
{isLoading ? (
<span className={styles.spinner} aria-hidden="true" />
) : (
<>
{leftIcon && <span className={styles.leftIcon}>{leftIcon}</span>}
<span className={styles.content}>{children}</span>
{rightIcon && <span className={styles.rightIcon}>{rightIcon}</span>}
</>
)}
</button>
);
}
);
Button.displayName = 'Button';
Button Styles
/* atoms/Button/Button.module.css */
.button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border: none;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease-in-out;
text-decoration: none;
}
.button:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
.button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Variants */
.primary {
background-color: var(--color-primary-500);
color: var(--color-white);
}
.primary:hover:not(:disabled) {
background-color: var(--color-primary-600);
}
.secondary {
background-color: transparent;
color: var(--color-primary-500);
border: 1px solid var(--color-primary-500);
}
.secondary:hover:not(:disabled) {
background-color: var(--color-primary-50);
}
.tertiary {
background-color: transparent;
color: var(--color-primary-500);
}
.tertiary:hover:not(:disabled) {
background-color: var(--color-primary-50);
}
.danger {
background-color: var(--color-danger-500);
color: var(--color-white);
}
.danger:hover:not(:disabled) {
background-color: var(--color-danger-600);
}
/* Sizes */
.sm {
padding: 6px 12px;
font-size: 14px;
min-height: 32px;
}
.md {
padding: 8px 16px;
font-size: 16px;
min-height: 40px;
}
.lg {
padding: 12px 24px;
font-size: 18px;
min-height: 48px;
}
/* Modifiers */
.fullWidth {
width: 100%;
}
.loading {
position: relative;
color: transparent;
}
.spinner {
position: absolute;
width: 16px;
height: 16px;
border: 2px solid currentColor;
border-right-color: transparent;
border-radius: 50%;
animation: spin 0.75s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Icon spacing */
.leftIcon,
.rightIcon {
display: flex;
align-items: center;
}
Input Atom Example
// atoms/Input/Input.tsx
import React from 'react';
import type { InputHTMLAttributes } from 'react';
import styles from './Input.module.css';
export type InputSize = 'sm' | 'md' | 'lg';
export inter
Установить atomic-design-atoms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepFAQ
Что делает скилл atomic-design-atoms?
Use when creating atomic-level UI components like buttons, inputs, labels, and icons. The smallest building blocks of a design system.
Как установить скилл atomic-design-atoms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл atomic-design-atoms запускает скрипты?
Нет, скилл состоит только из инструкций (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