thebushidocollective/han/atomic-design-atoms

Claude Code and agent skill by thebushidocollective/han

Trust tier 2
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when creating atomic-level UI components like buttons, inputs, labels, and icons. The smallest building blocks of a design system.

Install

npx vskill@latest install thebushidocollective/han/atomic-design-atoms

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

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
typescript
// 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
css
/* 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

typescript
// 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 interface InputProps
extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
/** Size variant */
size?: InputSize;
/** Error state */
hasError?: boolean;
/** Left addon element */
leftAddon?: React.ReactNode;
/** Right addon element */
rightAddon?: React.ReactNode;
}
export const Input = React.forwardRef<HTMLInputElement, InputProps>(
(
{
size = 'md',
hasError = false,
leftAddon,
rightAddon,
disabled,
className,
...props
},
ref
) => {
const wrapperClasses = [
styles.wrapper,
styles[size],
hasError && styles.error,
disabled && styles.disabled,
className,
]
.filter(Boolean)
.join(' ');
return (
<div className={wrapperClasses}>
{leftAddon && <span className={styles.leftAddon}>{leftAddon}</span>}
<input
ref={ref}
className={styles.input}
disabled={disabled}
aria-invalid={hasError}
{...props}
/>
{rightAddon && <span className={styles.rightAddon}>{rightAddon}</span>}
</div>
);
}
);
Input.displayName = 'Input';
css
/* atoms/Input/Input.module.css */
.wrapper {
display: flex;
align-items: center;
border: 1px solid var(--color-neutral-300);
border-radius: 6px;
background-color: var(--color-white);
transition: border-color 150ms, box-shadow 150ms;
}
.wrapper:focus-within {
border-color: var(--color-primary-500);
box-shadow: 0 0 0 3px var(--color-primary-100);
}
.input {
flex: 1;
border: none;
background: transparent;
outline: none;
width: 100%;
}
.input::placeholder {
color: var(--color-neutral-400);
}
/* Error state */
.error {
border-color: var(--color-danger-500);
}
.error:focus-within {
border-color: var(--color-danger-500);
box-shadow: 0 0 0 3px var(--color-danger-100);
}
/* Disabled state */
.disabled {
background-color: var(--color-neutral-100);
cursor: not-allowed;
}
.disabled .input {
cursor: not-allowed;
}
/* Sizes */
.sm {
min-height: 32px;
}
.sm .input {
padding: 6px 12px;
font-size: 14px;
}
.md {
min-height: 40px;
}
.md .input {
padding: 8px 12px;
font-size: 16px;
}
.lg {
min-height: 48px;
}
.lg .input {
padding: 12px 16px;
font-size: 18px;
}
/* Addons */
.leftAddon,
.rightAddon {
display: flex;
align-items: center;
padding: 0 12px;
color: var(--color-neutral-500);
}

Label Atom Example

typescript
// atoms/Label/Label.tsx
import React from 'react';
import type { LabelHTMLAttributes } from 'react';
import styles from './Label.module.css';
export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
/** Indicates required field */
required?: boolean;
/** Disabled state styling */
disabled?: boolean;
}
export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
({ required = false, disabled = false, children, className, ...props }, ref) => {
const classNames = [
styles.label,
disabled && styles.disabled,
className,
]
.filter(Boolean)
.join(' ');
return (
<label ref={ref} className={classNames} {...props}>
{children}
{required && (
<span className={styles.required} aria-hidden="true">
*
</span>
)}
</label>
);
}
);
Label.displayName = 'Label';

Icon Atom Example

typescript
// atoms/Icon/Icon.tsx
import React from 'react';
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
const sizeMap: Record<IconSize, number> = {
xs: 12,
sm: 16,
md: 20,
lg: 24,
xl: 32,
};
export interface IconProps extends React.SVGAttributes<SVGElement> {
/** Icon name/identifier */
name: string;
/** Icon size */
size?: IconSize;
/** Custom color */
color?: string;
/** Accessible label */
label?: string;
}
export const Icon: React.FC<IconProps> = ({
name,
size = 'md',
color = 'currentColor',
label,
className,
...props
}) => {
const pixelSize = sizeMap[size];
return (
<svg
className={className}
width={pixelSize}
height={pixelSize}
fill={color}
aria-label={label}
aria-hidden={!label}
role={label ? 'img' : 'presentation'}
{...props}
>
<use href={`/icons.svg#${name}`} />
</svg>
);
};
Icon.displayName = 'Icon';

Avatar Atom Example

typescript
// atoms/Avatar/Avatar.tsx
import React from 'react';
import styles from './Avatar.module.css';
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export interface AvatarProps {
/** Image source URL */
src?: string;
/** Alt text for image */
alt: string;
/** Fallback initials */
initials?: string;
/** Size variant */
size?: AvatarSize;
/** Additional class name */
className?: string;
}
export const Avatar: React.FC<AvatarProps> = ({
src,
alt,
initials,
size = 'md',
className,
}) => {
const [imageError, setImageError] = React.useState(false);
const classNames = [styles.avatar, styles[size], className]
.filter(Boolean)
.join(' ');
const showImage = src && !imageError;
const showInitials = !showImage && initials;
return (
<div className={classNames} role="img" aria-label={alt}>
{showImage && (
<img
src={src}
alt={alt}
className={styles.image}
onError={() => setImageError(true)}
/>
)}
{showInitials && (
<span className={styles.initials} aria-hidden="true">
{initials}
</span>
)}
{!showImage && !showInitials && (
<span className={styles.placeholder} aria-hidden="true">
?
</span>
)}
</div>
);
};
Avatar.displayName = 'Avatar';

Badge Atom Example

typescript
// atoms/Badge/Badge.tsx
import React from 'react';
import styles from './Badge.module.css';
export type BadgeVariant =
| 'default'
| 'primary'
| 'success'
| 'warning'
| 'danger'
| 'info';
export type BadgeSize = 'sm' | 'md';
export interface BadgeProps {
/** Visual variant */
variant?: BadgeVariant;
/** Size variant */
size?: BadgeSize;
/** Badge content */
children: React.ReactNode;
/** Additional class name */
className?: string;
}
export const Badge: React.FC<BadgeProps> = ({
variant = 'default',
size = 'md',
children,
className,
}) => {
const classNames = [styles.badge, styles[variant], styles[size], className]
.filter(Boolean)
.join(' ');
return <span className={classNames}>{children}</span>;
};
Badge.displayName = 'Badge';

Checkbox Atom Example

typescript
// atoms/Checkbox/Checkbox.tsx
import React from 'react';
import type { InputHTMLAttributes } from 'react';
import styles from './Checkbox.module.css';
export interface CheckboxProps
extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
/** Indeterminate state */
indeterminate?: boolean;
/** Label text */
label?: string;
}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
118
Repository forks
13
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thebushidocollective/han/atomic-design-atoms/badge)](https://verified-skill.com/skills/thebushidocollective/han/atomic-design-atoms)

Something wrong with this skill or its page? Tell us.