Skip to content

Add link support to the Icon block #79057

@JelleTempelman

Description

@JelleTempelman

What problem does this address?

The Icon block allows users to insert and style an SVG icon, but it currently does not provide a way to add a link to the icon.

This is limiting in common use cases where icons are used as visual calls to action or navigation elements. For example, in block themes it is possible to add an Icon block inside the Navigation block, but because the icon itself cannot be linked, it cannot easily function as a proper navigation item.

What is your proposed solution?

Add link support to the Icon block.

This could use the standard link UI already used by other core blocks and support common link-related attributes such as url, linkTarget, and rel.

On the front end, when a URL is set, the icon could be wrapped in an element. When no URL is set, the current output should remain unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DecisionNeeds a decision to be actionable or relevant[Block] IconAffects the Icon block[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions