|
/ Documentation /Spectra 3 Beta/ Icon In Spectra

Icon In Spectra

Introduction

The Icon Block allows you to add professional icons from Font Awesome’s extensive library to your content. Whether you need social media icons, interface elements, or decorative graphics, this block provides complete control over icon styling, colors, and interactions. Icons can be used individually or grouped together using the Icons (parent) block for creating icon sets.

How to Add or Use the Block in the Gutenberg Editor.

Method 1: Using Icons Container (Recommended)

  1. Add the Icons Block
    • Click the “+” button to open the block inserter
    • Search for “Icons” (plural) or find in Spectra category
    • Click on Icons Block to add the container
  2. Add Individual Icons
    • The container starts with one icon placeholder
    • Click the icon to open the icon picker
    • Select from hundreds of Font Awesome icons
    • Click “+” to add more icons to the group

Method 2: Standalone Icon

  1. Add an Icons block (as above)
  2. Add and customize a single icon
  3. Select the Icons container
  4. Use the transform option to convert to standalone icon

Icon Selection

Using the Icon Picker

  1. Browse by Category
    • Accessibility
    • Alert
    • Animals
    • Arrows
    • Audio & Video
    • Buildings
    • Business
    • And many more…
  2. Search Icons
    • Type keywords to filter icons
    • Search by icon name or related terms
  3. Icon Variants
    • Solid icons (filled)
    • Brand icons (company logos)

Block Styling Options

General Settings

Styling Settings

Icon Settings

OptionDescriptionAvailable Settings
IconSelected iconIcon picker with categories
SizeIcon dimensionspx, %, em, rem, vw (10-300px) vh
RotationRotate icon0-360 degrees with angle picker
Flip for RTLMirror for RTL languagesOn/Off toggle

Link Settings

OptionDescriptionAvailable Settings
Link URLMake icon clickableURL, email, phone, anchor
Open in New TabLink behaviorOn/Off toggle
Link RelRelationship attributesNoFollow, NoReferrer, Sponsored

Color Settings

OptionDescriptionAvailable Settings
Icon ColorPrimary icon colorColor picker
Icon Hover ColorColor on hoverColor picker
Background ColorBackground behind iconColor/Gradient picker
Background HoverBackground on hoverColor/Gradient picker

Accessibility Settings

ModeDescriptionUse Case
SVGInline SVG with titleIcons with meaning
ImageImage role with alt textDecorative with context
DecorativeHidden from screen readersPurely visual icons

Icons Container Settings

When using multiple icons in an Icons container:

Layout Options

OptionDescriptionAvailable Settings
Justify ContentHorizontal alignmentStart, Center, End, Space Between
Align ItemsVertical alignmentStart, Center, End
WrapAllow wrappingOn/Off toggle
GapSpace between icons0-100px (Responsive)

Container Styling

OptionDescriptionAvailable Settings
BackgroundContainer backgroundColor/Gradient picker
Hover BackgroundBackground on hoverColor/Gradient picker
PaddingInternal spacingTop, Right, Bottom, Left
BorderContainer borderWidth, Style, Color, Radius

Common Icon Configurations

Social Media Icons

  1. Use Icons container
  2. Add brand icons (Facebook, Twitter, Instagram, etc.)
  3. Set appropriate brand colors
  4. Add links to social profiles
  5. Open links in new tab

Responsive Controls

Device-Specific Settings

SettingDesktopTabletMobile
Icon Size✓✓✓
Container Gap✓✓✓
Padding✓✓✓
Margin✓✓✓

Styling Examples

Minimal Icons

  • No background
  • Single color
  • Small size (20-30px)
  • Subtle hover color change

Boxed Icons

  • Solid background
  • Rounded corners
  • Medium size (40-50px)
  • Background changes on hover

Circular Icons

  • Circular background (border-radius: 50%)
  • Centered icon
  • Contrasting colors
  • Shadow effects

Gradient Icons

  • Gradient backgrounds
  • Larger size (60-80px)
  • White icons
  • Hover animations

Advanced Features

Icon Rotation

  • Rotate any icon 0-360 degrees
  • Useful for arrows, refresh icons
  • Create unique orientations
  • Smooth hover rotations with CSS

RTL Support

Icons automatically flip for RTL languages when:

  • The icon has directional meaning
  • “Flip for RTL” is enabled
  • Useful for arrows, navigation icons

Accessibility Features

Three Accessibility Modes:

  1. SVG Mode (Default)
    • Adds title element to SVG
    • Screen readers announce icon meaning
    • Best for functional icons
  2. Image Mode
    • Treats icon as image with alt text
    • Good for complex icon meanings
    • Provides more context
  3. Decorative Mode
    • Hides from screen readers
    • For purely visual icons
    • Reduces screen reader noise

Tips and Best Practices

Icon Selection

  • Clarity: Choose icons that clearly represent their purpose
  • Consistency: Use icons from the same style set
  • Recognition: Prefer commonly understood icons
  • Simplicity: Avoid overly complex icons at small sizes

Styling Guidelines

  • Size Hierarchy: Larger icons for importance
  • Color Consistency: Match brand colors
  • Hover Feedback: Always provide hover states
  • Spacing: Adequate space around icons

Performance Tips

  • Limit Quantity: Too many icons can slow loading
  • Optimize Size: Use appropriate sizes
  • Reuse Styles: Create consistent icon patterns

Accessibility Best Practices

  • Meaningful Labels: Provide clear accessibility labels
  • Link Context: Ensure linked icons have purpose
  • Color Contrast: Maintain WCAG contrast ratios
  • Focus Indicators: Visible focus for keyboard users

Block Toolbar Options

Icons Container Toolbar

  • Add Icon: Insert new icon to group
  • Layout: Switch between layouts
  • Transform: Convert to other blocks
  • Alignment: Wide, full width options

Individual Icon Toolbar

  • Replace Icon: Quick icon switcher
  • Link: Add/edit icon link
  • Remove: Delete from group

Common Use Cases

  1. Social Media Links: Brand icons linking to profiles
  2. Service Features: Icons with feature descriptions
  3. Contact Information: Phone, email, location icons
  4. Navigation Menus: Icons with menu items
  5. Call-to-Action: Icons emphasizing buttons
  6. Testimonial Ratings: Star icons for ratings
  7. Process Steps: Numbered or sequential icons
  8. Technology Stack: Brand icons for tools/languages

Tips and Best Practices

Design Guidelines

  1. Icon Selection
    • Choose icons that are universally recognizable
    • Maintain consistent style (outlined vs filled)
    • Use metaphors appropriate to your audience
    • Avoid overly decorative or complex icons
  2. Size and Scaling
    • Standard sizes: 16px (small), 24px (medium), 32px (large)
    • Maintain consistent sizing within groups
    • Scale proportionally with surrounding text
    • Test visibility at different zoom levels
  3. Color Usage
    • Limit to 2-3 colors per icon group
    • Use brand colors consistently
    • Ensure sufficient contrast (3:1 minimum)
    • Consider color-blind users

Performance Optimization

  1. Icon Loading
    • Font Awesome loads only used icons
    • SVG format is resolution-independent
    • No additional image requests
    • Minimal impact on page load
  2. Animation Best Practices
    • Use CSS transitions over JavaScript
    • Limit to hover/focus states
    • Keep animations subtle (0.2-0.3s)
    • Avoid continuous animations

Accessibility Guidelines

  1. Screen Reader Support
    • Add descriptive aria-labels
    • Use role=”img” for decorative icons
    • Include text alternatives
    • Hide purely decorative icons
  2. Keyboard Navigation
    • Ensure focusable if interactive
    • Visible focus indicators
    • Logical tab order
    • Keyboard shortcuts where appropriate

Layout Strategies

  1. Icon Grouping
    • Use consistent spacing (16-24px)
    • Align to baseline grid
    • Group related icons
    • Consider visual weight balance
  2. Responsive Design
    • Stack icons vertically on mobile
    • Adjust sizes for touch targets (44x44px)
    • Hide non-essential icons
    • Use media queries for layouts

Common Mistakes to Avoid

  • Using too many different icon styles
  • Making icons too small to recognize
  • Poor contrast against backgrounds
  • Overusing animation effects
  • Relying solely on icons without labels
  • Inconsistent sizing within groups

Troubleshooting

Icon not displaying?

  • Check if icon is selected in picker
  • Verify Font Awesome is loading
  • Clear browser cache
  • Check for CSS conflicts

Hover effects not working?

  • Ensure hover colors are different from default
  • Check theme doesn’t override styles
  • Test in preview mode

Icons not aligning properly?

  • Check container layout settings
  • Verify gap and alignment options
  • Use consistent icon sizes

Accessibility warnings?

  • Add meaningful labels for functional icons
  • Use decorative mode for visual-only icons
  • Test with screen readers

Frequently Asked Questions

Q: How many icons are available? 
A: The block includes hundreds of Font Awesome icons across multiple categories.

Q: Can I upload custom icons? 
A: Currently, the block uses Font Awesome icons. Custom SVG support may be added in future.

Q: Can I use emoji as icons? 
A: The block is designed for Font Awesome icons. Use the Paragraph block for emoji.

Q: How do I make icons the same size? 
A: Set a consistent size in the Icons container or individually match sizes from the icon size settings.

Q: Can icons have different colors in one group? 
A: Yes, each icon can have its own color settings.

Q: Do icons work with dark mode? 
A: Yes, use CSS custom properties or theme integration for dark mode support.

Advanced Customization

Icon Combinations

Create meaningful icon combinations:

  • Icon + Text (using columns)
  • Icon + Heading (for features)
  • Icon + Button (for CTAs)
  • Icon + Counter (for statistics)

Available Extensions

Animation Extension

Icons support Spectra animations:

  • Entrance animations
  • Custom timing
  • Works with icon groups and Individual icons

Compatibility and Requirements

System Requirements

  • WordPress: 6.6.0 or higher
  • PHP: 8.1 or higher
  • Browser: Modern browsers with SVG support

Icon Library

  • Font Awesome: Version 5+ icons
  • Regular Updates: New icons added periodically
  • Backwards Compatible: Supports older icon names

Theme Compatibility

  • Works with all standard themes
  • SVG icons adapt to theme colors
  • No font dependencies
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Get Notified When Available

Note - You can purchase the Essential Toolkit now and easily upgrade to the Business Toolkit once it becomes available.

Get your hands on Spectra Pro

Enter your name and email address to get access to Spectra Pro.