π v0.24.2 β Local Consumer Icons
A focused patch that lets consuming apps supply their own SVG icons alongside the gem's built-in Ionicons set β no configuration, no subclassing, no overrides. Drop a file, use the helper.
What's New
Nothing new this release. See v0.24.1 for Motion Primitives and v0.24.0 for Device Frames, Media Players & Agentic Chat.
What Changed
IconComponent β Local consumer icon lookup
midwest_icon now checks app/assets/icons/ in your Rails application before falling back to the gem's bundled Ionicons set. Drop any .svg file there and reference it by name exactly as you would a built-in icon:
<%= midwest_icon :my_brand_logo %><%= midwest_icon :custom_badge, size: :lg %>The lookup is automatic and silent β if app/assets/icons/my_brand_logo.svg exists, it renders that file; otherwise the gem's icon library is checked as usual. Custom icons also bypass the UnknownIconError guard, so no exception is raised when a matching local file is present.
This makes it practical to extend the icon set with brand marks, custom glyphs, or third-party icon SVGs without patching the component or maintaining a parallel helper.
What Was Removed
- Nothing was removed this release. No component options, slots, or helpers were dropped, and there are no breaking API changes.
Dev Process
- Internals β a
consumer_icon_pathprivate method onIconComponentchecksRails.root.join('app', 'assets', 'icons', "#{name}.svg")and returns thePathnameif it exists;render?short-circuits on a hit;icon_sourceresolves the path throughconsumer_icon_pathbefore falling back toMidwest::Engine.root. - Gemfile locks β routine lock bumps for the Rails 7, Rails 8, and Bridgetown v1/v2 gemfiles.