# First component attempt. I've had a go at creating a Nav Button Highlighter. Not working as yet

**URL:** https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090
**Category:** Development
**Created:** [11 בנובמבר,‏ 2025,‏ 2:47am UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090 "2025-11-11T02:47:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Drew-ART](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@Drew-ART](https://meta.discourse.org/u/Drew-ART)
#### Post date: [11 בנובמבר,‏ 2025,‏ 2:47am UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090/1 "2025-11-11T02:47:59Z")

</div>

> **[GitHub - focallocal/nav-buttons-highlighter: A discourse plugin to highlight the...](https://github.com/focallocal/nav-buttons-highlighter/tree/main)**
>
> main

I wanted to turn any nav links, or all nav links, into buttons. In my case so users would see and want to click the ones i want them to click.

Also to take them out of the drop down menu on mobile as that’s fine navigation if they aren’t a key path you want users to take, but when it is one you’d want it not tucked away in there, so i tried to give them their own line on mobile.

As someone else might want to use it i’ve attempted to turn it into a proper component repo, but unfortunately i wasn’t able to get the highlight working. Can anyone with a bit more experience see something i’ve missed?

---

<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: [11 בנובמבר,‏ 2025,‏ 5:12am UTC](https://meta.discourse.org/t/first-component-attempt-ive-had-a-go-at-creating-a-nav-button-highlighter-not-working-as-yet/388090/2 "2025-11-11T05:12:52Z")

</div>

Here’s something I see at a glance: you should move your script to a dedicated initializer file, in `javascripts/discourse/api-initializers/script.js`.
