# Use color-input component with non-admin users

**URL:** https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791
**Category:** Development
**Tags:** ember
**Created:** [November 6, 2025, 3:40pm UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791 "2025-11-06T15:40:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pirhoo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirhoo/32/527677_2.png) [@pirhoo](https://meta.discourse.org/u/pirhoo)
#### Post date: [November 6, 2025, 3:40pm UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791/1 "2025-11-06T15:40:13Z")

</div>

Hello 👋

In one of my plugins I would like to use the [`color-input`](https://github.com/discourse/discourse/blob/main/frontend/discourse/admin/components/color-input.gjs) component. However this component is located in the `discourse/admin` folder so whenever I try to import it as a non-admin user, it cannot be found because Discourse prevents non-admin users from loading admin components (if I understood correctly).

**Would it make sense to move this component outside of the admin folder?**

The alternative is obviously to use my own component or copy the existing one, but I wanted to ask you first. Maybe there is a way to load this component regardless of the user status but I don’t know how.

Thanks for your help!

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [November 7, 2025, 11:12am UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791/2 "2025-11-07T11:12:50Z")

</div>

Or perhaps, make all admin stuff available in TCs/plugins (only programmatically via customizations) that can be used by normal users? That may be useful as well.

---

<div class="post-metadata">

### Author: ![pirhoo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirhoo/32/527677_2.png) [@pirhoo](https://meta.discourse.org/u/pirhoo)
#### Post date: [November 7, 2025, 12:00pm UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791/3 "2025-11-07T12:00:13Z")

</div>

I don’t know if the plugin’s bundles are tree-shaked so making all admin stuff available could have a big cost. But more generally I agree it would be great to be able to use those components which are very nice.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [November 7, 2025, 12:28pm UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791/4 "2025-11-07T12:28:57Z")

</div>

Yeah this is exactly the problem - we don’t (yet) have any automatic tree-shaking. Admin modules are separated out manually so that regular users don’t have to pay the cost of loading them over the network.

> [@pirhoo](#):
>
> copy the existing one

That’s probably the best bet. IIRC the color selector is fairly self-contained so it should be easy to copy. That also has the advantage of insulating your plugin from any changes made to the core component (which isn’t really considered “public api”)

---

<div class="post-metadata">

### Author: ![pirhoo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pirhoo/32/527677_2.png) [@pirhoo](https://meta.discourse.org/u/pirhoo)
#### Post date: [November 7, 2025, 3:34pm UTC](https://meta.discourse.org/t/use-color-input-component-with-non-admin-users/387791/5 "2025-11-07T15:34:17Z")

</div>

I figured, thanks for the answer anyway!
