Skip to main content
UI components are low-level building blocks including icons and other interface primitives used throughout the site.

Icon Components

All icon components share a consistent interface and styling approach.

Common Props

All icon components accept the following prop:
string
default:"varies by icon"
CSS classes to apply to the SVG element. Each icon has a sensible default size.

Common Features

  • SVG-based for sharp rendering at any size
  • Responsive to text color via currentColor
  • Optimized paths from standard icon libraries
  • Consistent sizing defaults
  • Accessible when used with proper ARIA labels

A diagonal arrow icon commonly used for links and CTAs indicating external navigation or forward movement.Default size: w-4 h-4Usage:
Features:
  • Stroke-based rendering
  • 2px stroke width
  • Round line caps and joins
  • Points diagonally up-right
A checkmark icon for success states and confirmations.Default size: w-5 h-5Usage:
A duplicate/copy icon for clipboard operations.Default size: w-5 h-5Usage:

Social Media Icons

All social icons default to w-6 h-6 and use filled rendering for bold, recognizable branding.
GitHub logo icon.Usage:
Path data: Complete GitHub Octocat logo path
X (formerly Twitter) logo icon.Usage:
Path data: Modern X logo design
LinkedIn logo icon.Usage:
Path data: Official LinkedIn logo
Dev.to logo icon for developer community.Usage:
Email envelope icon. Uses stroke rendering unlike other social icons.Default size: w-6 h-6Usage:
Rendering: Stroke-based with 2px width, round caps
Facebook logo icon.Usage:
Hacker News logo icon.Usage:
Pinterest logo icon.Usage:
Reddit logo icon.Usage:
Telegram logo icon.Usage:
WhatsApp logo icon.Usage:

Icon Usage Patterns

Icons are commonly used with the SocialLink component:

With Buttons

Icons enhance button actions:

With Notifications

Icons provide visual context:

Icon Customization

Size Variants

Common size classes for icons:

Color Variants

Icons inherit color from parent or can be colored directly:

Animation

Icons can be animated with Tailwind utilities:

Icon Structure

All icon components follow this structure:

Key Attributes

string
Accepts any Tailwind or custom CSS classes for sizing and styling
string
Usually currentColor to inherit parent text color. Some icons use none for stroke-based rendering.
string
Used in stroke-based icons like ArrowIcon and EmailIcon. Also set to currentColor.
string
Standard 0 0 24 24 for consistent sizing across all icons

Creating Custom Icons

To add a new icon to the UI components:
  1. Create the component file:
  1. Export from the icons barrel file:
  1. Use in components:

Finding SVG Path Data

Sources for icon paths:

Optimization Tips

  • Use SVGO to optimize path data
  • Prefer currentColor for fill/stroke
  • Keep viewBox at 0 0 24 24 for consistency
  • Remove unnecessary attributes
  • Simplify complex paths when possible

Icon Export Structure

Icons are exported from the barrel file at: ~/workspace/source/src/components/ui/icons/index.ts Current exports:
This allows for clean imports:

Best Practices

  • Add aria-label to parent links/buttons
  • Use descriptive labels like “Visit my GitHub profile”
  • Don’t rely on icons alone for meaning
  • Provide text alternatives when needed
  • Icons are inline SVGs (no extra HTTP requests)
  • Small file size per icon
  • Rendered as part of the document
  • No JavaScript required
  • Use consistent sizing across similar elements
  • Maintain 24x24 viewBox for all custom icons
  • Use currentColor for theme compatibility
  • Follow the established component structure
All icons automatically adapt to theme changes:
  • Light theme: Inherits dark text colors
  • Dark theme: Inherits light text colors
  • Retro theme: Works with custom theme colors
  • No additional CSS required

Future UI Components

The UI components directory is designed to accommodate:
  • Button primitives - Reusable button styles
  • Input components - Styled form inputs
  • Badge components - Labels and tags
  • Avatar components - User profile images
  • Skeleton loaders - Loading states
  • Tooltip components - Contextual help
As your design system grows, add new primitives to maintain consistency across the application.