Repository navigation
Solid icons: <Icon variant="solid"> from an opt-in entry - #629
Merged
Merged
Conversation
/basics/icons: search the set, pick an icon to see it at every size, try it in each colour and with round or square caps (data-border), and copy its name or JSX. The Icon component page now points there instead of carrying the gallery. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
Six columns of nowrap tiles were wider than the article (968 px in 704). Four columns, tiles that may shrink, and labels that wrap. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
Every built-in icon gets its filled version from the icons repo, generated into src/icons/solidData.ts and exported from @once-ui-system/core/icons/solid so only apps that import it ship it (Icon looks icons up by name at runtime, so nothing in the registry is tree-shaken). IconProvider takes it as solidIcons; Icon's variant="solid" draws it, falling back to the line icon. Cut-outs that the icons repo paints in a background colour become SVG masks (createIcon, ids from useId), so they show whatever sits behind the icon. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
# Conflicts: # apps/docs/src/content/basics/icons.mdx # apps/docs/src/product/IconExplorer.tsx
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lorant asked for the filled icons in core (28 Nov), on the condition that apps not using them don't pay for them.
Iconlooks icons up by name at runtime, so nothing in the registry is tree-shaken; the solid set therefore ships as its own entry.Core
@once-ui-system/core/icons/solidexportssolidIconLibrary: every built-in icon, filled, generated byscripts/generate-icons.mjsfrom once-ui-system/icons intosrc/icons/solidData.ts(about 14 KB gzipped, only for apps that import it; the main entry doesn't reference it, and a test checks that).IconProvidertakessolidIcons;<Icon variant="solid">draws the solid icon and falls back to the line icon when none is registered.--icon-knock) become SVG masks increateIcon, with ids fromuseId. They show whatever is behind the icon, so they work on any surface.createIcon;bundle-size.jsonis updated.icon-solid.test.tsxcover: the set is complete, line is the fallback, solid when registered, masks instead of paint with unique ids, and the solid set is not in the main entry. The exports-map test lists the new entry.Docs
This contains #628's commits until that merges; I'll merge preview in afterwards. It's a new API, so it goes in the next minor.
Generated by Claude Code