This isn't directly related to d3 but it may have something that you can use as an example. I used SnapSVG instead of d3 but I have navigation and other buttons using it, hopefully it can be a bit useful to you.
I did some other experiments using SnapSVG to make an interface for tiddlywiki a few years ago and had some success with it before getting distracted. Somewhere I have a draggable navigation menu using it but I am not sure what the URL is right now. https://ooktech.com/jed/ExampleWikis/SnapSVG/ -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a98f959a-ceab-4c5a-97f5-d9b348f13a24%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

