Allow global icon sizing configuration for components (avoid hardcoded 16x16 size) #6572
artdive
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Currently, many HeroUI components seem to have their internal icon sizes hardcoded or strongly tied to a
16x16(e.g.,size-4) grid layout. While this works perfectly for icon packs like Gravity Icons, it creates a lot of friction when using other popular icon sets.For example, packs like Nucleo UI use an
18x18grid for standard icons and12x12for smaller variants. To make them look right in HeroUI components, we have to manually override sizes everywhere by explicitly applying utility classes likesize-*on every single icon instance.Proposed Solution
Instead of hardcoding specific Tailwind sizing utilities directly onto the slots, it would be awesome to introduce a way to globally configure or dynamically adjust default icon sizes.
Alternatively, components could apply a dedicated semantic class (e.g.,
hui-icon-md,hui-icon-sm) or rely on CSS variables, allowing us to easily override the default16x16baseline to something like18x18globally across the entire application theme.Benefits
className="size-[18px]"overrides on every component.All reactions