Skip to content

Icon: Add SVG files for forms block#74116

Open
SirLouen wants to merge 3 commits intoWordPress:trunkfrom
SirLouen:design/form-hash-icons
Open

Icon: Add SVG files for forms block#74116
SirLouen wants to merge 3 commits intoWordPress:trunkfrom
SirLouen:design/form-hash-icons

Conversation

@SirLouen
Copy link
Member

Referencing this PR #73996

Two new icons needed for the Forms block

  • forms icon adapted from the original dashicons, with 24×24 canvas and 18×18 icon maintaining the original aspect ratio.
  • New hash icon standardized with, 24×24 canvas, 18×18 icon, lines 1.5px

Once this PR is merged, I will merge it into #73996 so we can move it forward.

cc @jameskoster @mattmiklic

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SirLouen <[email protected]>
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the [Package] Icons /packages/icons label Dec 19, 2025
@SirLouen SirLouen added the [Type] Enhancement A suggestion for improvement. label Dec 19, 2025
@SirLouen SirLouen added the Needs Design Feedback Needs general design feedback. label Dec 19, 2025
@jameskoster jameskoster requested a review from a team December 19, 2025 10:49
@jameskoster
Copy link
Contributor

I wonder if there are other options for the form icon? This one from Lucide is quite nice.

The hash seems a little large, maybe it should have a 16px footprint like some of the other icons in the library?

@jasmussen
Copy link
Contributor

jasmussen commented Dec 19, 2025

Thanks for contributing. I'd echo Jay's point, the Lucide one is quite nice. In general I would not adapt from Dashicons, but copy an existing WordPress icon and adapt that, that way you'll get the right spacing, positioning, metrics, etc.

The hash seems useful as an icon to have, but it's not clear to me that it reads as "number input". In fact all these icons feel somewhat eclectic:

image

I know they are dashicons, but the feedback remains regardless of style: these are all icons for child blocks of the form, and I would expect them to share some visual aspects so they feel related, like they belong together. This is similar to what has been done for comment related icons:

image

Extrapolating on Jay's feedback about the Lucide icon, what you could do is take a similar approach: have a general form icon, then variants that keep the top half of that icon but substitute small details below, like letters. ASCII mockups:

Form

--
[ ]

Text

--
--- --

checkbox

--
[X]

email

--
@

email

--
#

I'd even challenge the idea that each of those child items need to have bespoke unique icons. All "title" blocks have the same icons:

image

Similarly, I could see you having a single Form icon, and a single icon for all form child blocks inside.

None of these feelings are strong, hope the advice is useful.

@SirLouen
Copy link
Member Author

@jameskoster this was the forms icon in dashicons (same name). But here is representing the checkbox input. My alternative would be calling it differently, like checkboxes.svg and maybe adding the forms.svg for the main forms icon you propose (but this will be a future PR, here I'm first working on the forms input block, not the forms block).

I've switched to checkboxes.svg the name for the forms.svg and reduced to 16px the footprint of the hash.

@jasmussen ngl, your proposal looks ambitious, but it could potentially generate too much discussion about whether they fit or not. To me, it looks more appropriate for a future enhancement than for what it's pretending to be now (switching from dashicons that should be eliminated to SVG). So, I tried to fit with the current set of icons as many as I could.

For now, I'm just trying to triage and add these two icons to the set, with the objective of pushing the forms block out of experimental phase for 2026. Maybe a future iteration could be making a set of icons that uniformly represent each of the aspects of the form's idea.

@jasmussen
Copy link
Contributor

I don't think it's necessarily ambitious, and having good icons is a blocker to stabilizing/shipping the block. I took a quick stab at the idea I outlined, click to enlarge:

options

It did not come together as I hoped, there's not a lot of room for detail, so I tried an alternative:

options 2

@SirLouen
Copy link
Member Author

SirLouen commented Dec 28, 2025

I don't think it's necessarily ambitious, and having good icons is a blocker to stabilizing/shipping the block. I took a quick stab at the idea I outlined, click to enlarge:

options It did not come together as I hoped, there's not a lot of room for detail, so I tried an alternative:

For the first version, I'm saying that is ambitious, because there a lot of casuistry that will end breaking the format, as you said, there is no room for detail, and some fields like telephone will not be noticeable.

The second format is more in line what we already have adding some extra icons. From there for this PR we could extract:

  1. ✅ The form one, looks good
  2. ✅ There is no form-input by itself. All are variations. In this case the form-input-text also adequate.
  3. ✅ There is a form-input-textarea MAybe we could take the form-text for form-input-textarea and form-input for form-input-text
  4. ❓ For the form-input-checkbox . Maybe a square and a circle (for checkbox) are a little underrepresented? Maybe the circle with an inner circle and the checkbox with the X would be more adequate?
  5. ❓ There is no form-radio yet but they might be soon, so adding them now would be a good opportunity
  6. ❓ For the form-email I don't have any hard feelings, I like current envelope.svg. It's being used by dataform-controls now for the email field. So if we want to have something different for this, would be ok to have this @
  7. ❓ For the form-number I proposed a hash, so a hash would be ok. I resorted to 1.5px lines because this is the standard in every single SVG out there.

I'm assuming that the URL fits with the current ´link.svgone. And for the phone,mobile.svg` we have agreed.

Conclusion

I am inclined to move this as we cannot be stuck deciding this for a century.

I would take @jasmussen proposals for form, input, text checkbox and radio (maybe with the little variation I commented above). I would stick to my hash for number, to the envelope.svg and maintain, link and mobile and with this set, call it a day.

@SirLouen SirLouen self-assigned this Dec 28, 2025
@t-hamano
Copy link
Contributor

I'm concerned about the reason for releasing new icons while the Form Block is still experimental. As I mentioned here, Can we make the icons internal? That way, it would be easier to iterate.

Once the Form Block or the icon design has stabilized, we can consider whether it's worth releasing those icons to the public.

@jasmussen
Copy link
Contributor

I'd echo that these icons should be local first, and welcome all the feedback, by the way. They may even remain internal to the block itself, even after "graduation"; one one consideration is that the icons here are ideally block specific (which is why I explored direction 1 first), meant to be unique icons used just for this block and not generically for other applications. For example if there are URL and Mobile blocks needed, IMO they should not use the existing icons there, because they are link and mobile blocks. I realize that nuance is difficult, but it's nevertheless also context for the radio and checkbox icons, which outside of the parent block context will simply be squares and circles. So perhaps the action item for now is to keep discussing this, but mature the block under the existing experiment, and decide on the iconography towards the end. For example one option which after the latest discussion seems increasingly compelling to me is to not make multiple bespoke icons for each different form sub-block type, but to have a single icon for form, and a single icon for form block, applied to every child block inside.

@SirLouen
Copy link
Member Author

SirLouen commented Dec 29, 2025

Ok @t-hamano @jasmussen
Let's go with the internal icons approach
@jasmussen can you send the icons SVG for the second set if you have them?
Anyway I would leave this open as we iterate through forms block we could keep this discussion open as getting to a final decision in terms of design seems to take a minute.

@jasmussen
Copy link
Contributor

The multiple icons didn't sit right with me, so I kept thinking about it, and increasingly would propose that since all the child blocks of this parent form block are usable only inside that one parent, maybe they can share icons. The motivation is similar list view apps, like Figma: all frames despite having different contents, use the same icon. Also: to avoid the circles and squares, should they ever land in the icon library, for being used as utility icons like dots or bullets. For that reason, I revisited this yet again, with this option:

image

A generic form icon, and a generic form elemement icon. SVGs in case it is useful to move things forward. Form:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16H6c-1.1 0-2 .9-2 2s.9 2 2 2h12c1.1 0 2-.9 2-2s-.9-2-2-2Zm0 2.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5ZM13 13H4v1.5h9V13Zm-7-2h12c1.1 0 2-.9 2-2s-.9-2-2-2H6c-1.1 0-2 .9-2 2s.9 2 2 2Zm0-2.5h12c.3 0 .5.2.5.5s-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5ZM13 4H4v1.5h9V4Z"/></svg>

Form element:

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#000" fill-rule="evenodd" d="M5.547 18.892A.99.99 0 0 0 6 19h.72v1H6a1.99 1.99 0 0 1-.908-.22l.455-.888ZM9.12 20H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.587-.22c-.272.14-.58.22-.907.22h-.72v-1H18a.99.99 0 0 0 .453-.108l.454.888ZM5.108 17.547a.99.99 0 0 0 0 .906l-.89.454a1.99 1.99 0 0 1 0-1.815l.89.455Zm14.672-.455a1.99 1.99 0 0 1 0 1.815l-.888-.454a.99.99 0 0 0 0-.906l.888-.455ZM6.72 17H6a.99.99 0 0 0-.453.108l-.455-.89A1.99 1.99 0 0 1 6 16h.72v1ZM18 16c.327 0 .635.08.907.219l-.454.89A.99.99 0 0 0 18 17h-.72v-1H18Zm-8.88 1H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1ZM5.5 14.28H4.25v-1H5.5v1Zm2.5 0H6.5v-1H8v1Zm2.5 0H9v-1h1.5v1Zm2.25 0H11.5v-1h1.25v1ZM18 7a2 2 0 1 1 0 4H6a2 2 0 1 1 0-4h12ZM6 8.5a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H6Zm7-3H4V4h9v1.5Z" clip-rule="evenodd"/></svg>

Note that all these icon explorations are here, in this Figma file. And keep Aki's feedback in mind, I would defer to his instincts on how to proceed, what to add or not, and how to add them.

@t-hamano
Copy link
Contributor

A generic form icon, and a generic form elemement icon.

That's a great idea, and since it's more abstract, we could consider exposing it in an icon library in the future. In #73996, I think we can set those two icons as the internal icons of the Form block.

Regarding the new "hash" icon, we can discuss if necessary, whether it's worth exposing as a generic icon, unrelated to the Form Block.

@SirLouen
Copy link
Member Author

I'm also fine with this proposal
I've updated #73996 and #74297 to include internal icons following this

Also I'm updating this PR to include this two first proposal of icons so it's still open for discussion.

@SirLouen SirLouen force-pushed the design/form-hash-icons branch from 463031b to 758837e Compare December 31, 2025 16:07
@SirLouen SirLouen changed the title Icon: Add SVG files for forms and hash icons Icon: Add SVG files for forms block Dec 31, 2025
@SirLouen SirLouen removed their assignment Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Design Feedback Needs general design feedback. [Package] Icons /packages/icons [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants