Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

Adds support for custom checked icons in checkbox and option components - #2425

Open
rrambul wants to merge 3 commits into
shoelace-style:nextfrom
rrambul:renanrsilva/adds-support-for-custom-icons
Open

rrambul wants to merge 3 commits into
shoelace-style:nextfrom
rrambul:renanrsilva/adds-support-for-custom-icons

Conversation

@rrambul

@rrambul rrambul commented Apr 8, 2025

Copy link
Copy Markdown

closes #2424

Summary

This PR adds support for custom icons in the checkbox and option components.

  • Adds support for a custom checked icon in the checkbox component

  • Adds support for a custom indeterminate icon in the checkbox component

  • Adds support for a custom selected icon in the option component (used in select)

Motivation

The idea is to expose slots for the checked and indeterminate icons in the checkbox component, as well as for the selected icon in the option component. This allows them to be replaced when desired, while keeping the current icons as defaults.

Context

See discussion: shoelace-style/shoelace#2325

Detailed Description

To implement this, the checkbox and option components were updated to wrap the current icons inside named slots. This preserves the existing behavior but enables consumers to override the icons by providing custom content via the new slots.

@vercel

vercel Bot commented Apr 8, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Apr 8, 2025 3:29am

@rrambul

rrambul commented May 21, 2025

Copy link
Copy Markdown
Author

@claviska would you mind reviewing when you get a chance? Thanks!

This branch was successfully deployed

1 active deployment
Preview 6cec5a7c Deployed Apr 8, 2025 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adds support for custom checked icons in checkbox and option components

1 participant