atomic-design-molecules
БесплатноБез исполняемых скриптовНе проверенUse when composing atoms into molecule components like form fields, search bars, and card headers. Molecules are functional groups of atoms.
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
Atomic Design: Molecules
Master the creation of molecule components - functional groups of atoms that work together as a unit. Molecules combine multiple atoms to create more complex, purposeful UI elements.
What Are Molecules?
Molecules are the first level of composition in Atomic Design. They are:
- Composed of atoms only: Never include other molecules
- Single purpose: Do one thing well
- Functional units: Atoms working together for a specific task
- Reusable: Used across different organisms and contexts
- Minimally stateful: May have limited internal state for UI concerns
Common Molecule Types
Form Molecules
- Form fields (label + input + error)
- Search forms (input + button)
- Toggle groups (label + toggle)
- Date pickers (input + calendar trigger)
- File uploaders (dropzone + button)
Navigation Molecules
- Nav items (icon + text + indicator)
- Breadcrumb items (link + separator)
- Pagination controls (buttons + page indicator)
- Tab items (icon + label)
Display Molecules
- Media objects (avatar + text)
- Card headers (title + subtitle + action)
- List items (checkbox + content + actions)
- Stat displays (label + value + trend)
Action Molecules
- Button groups (multiple buttons)
- Dropdown triggers (button + icon)
- Icon buttons (icon + tooltip)
- Action menus (button + menu items)
FormField Molecule Example
Complete Implementation
// molecules/FormField/FormField.tsx
import React from 'react';
import { Label } from '@/components/atoms/Label';
import { Input, type InputProps } from '@/components/atoms/Input';
import { Text } from '@/components/atoms/Typography';
import styles from './FormField.module.css';
export interface FormFieldProps extends InputProps {
/** Field label */
label: string;
/** Unique field identifier */
name: string;
/** Help text below input */
helpText?: string;
/** Error message */
error?: string;
/** Required field indicator */
required?: boolean;
}
export const FormField = React.forwardRef<HTMLInputElement, FormFieldProps>(
(
{
label,
name,
helpText,
error,
required = false,
id,
className,
...inputProps
},
ref
) => {
const fieldId = id || `field-${name}`;
const helpTextId = helpText ? `${fieldId}-help` : undefined;
const errorId = error ? `${fieldId}-error` : undefined;
const describedBy = [helpTextId, errorId].filter(Boolean).join(' ') || undefined;
return (
<div className={`${styles.field} ${className || ''}`}>
<Label htmlFor={fieldId} required={required} disabled={inputProps.disabled}>
{label}
</Label>
<Input
ref={ref}
id={fieldId}
name={name}
hasError={!!error}
aria-describedby={describedBy}
aria-required={required}
{...inputProps}
/>
{helpText && !error && (
<Text id={helpTextId} size="sm" color="muted" className={styles.helpText}>
{helpText}
</Text>
)}
{error && (
<Text id={errorId} size="sm" color="danger" className={styles.error} role="alert">
{error}
</Text>
)}
</div>
);
}
);
FormField.displayName = 'FormField';
/* molecules/FormField/FormField.module.css */
.field {
display: flex;
flex-direction: column;
gap: 6px;
}
.helpText {
margin-top: 2px;
}
.error {
margin-top: 2px;
display: flex;
align-items: center;
gap: 4px;
}
SearchForm Molecule Example
// molecules/SearchForm/SearchForm.tsx
import React, { useState, useCallback } from 'react';
import { Input } from '@/components/atoms/Input';
import { Button } from '@/components/atoms/Button';
import { Icon } from '@/components/atoms/Icon';
import styles from './SearchForm.module.css';
export interface SearchFormProps {
/** Placeholder text */
placeholder?: string;
/** Initial search value */
defaultValue?: string;
/** Submit handler */
onSubmit: (query: string) => void;
/** Change handler for live search */
onChange?: (query: string) => void;
/** Loading state */
isLoading?: boolean;
/** Size variant */
size?: 'sm' | 'md' | 'lg';
/** Show clear button */
clearable?: boolean;
}
export const SearchForm: React.FC<SearchFormProps> = ({
placeholder = 'Search...',
defaultValue = '',
onSubmit,
onChange,
isLoading = false,
size = 'md',
clearable = true,
}) => {
const [query, setQuery] = useState(defaultValue);
const handleChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
setQuery(value);
onChange?.(value);
},
[onChange]
);
const handleSubmit = useCallback(
(e: React.FormEvent) => {
e.preventDefault();
onSubmit(query.trim());
},
[onSubmit, query]
);
const handleClear = useCallback(() => {
setQuery('');
Установить atomic-design-molecules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepFAQ
Что делает скилл atomic-design-molecules?
Use when composing atoms into molecule components like form fields, search bars, and card headers. Molecules are functional groups of atoms.
Как установить скилл atomic-design-molecules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл atomic-design-molecules запускает скрипты?
Нет, скилл состоит только из инструкций (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