I'm looking into using the Category Widget in a custom Map, using Carto JS v4.

I've managed to get the data to show up on my map, and Now I want to have a category Widget, like the one you have Carto Builder based maps.

The only example I've found, is on their site, over here: https://carto.com/documentation/cartojs/examples/#example-category-widget

This seems to work, except it doesn't have any UI.

How do I get the widget with UI similar to the one Carto Builder?

1 Answer 1


Disclaimer: I work at CARTO

CARTO.js does not provide UI for widgets, it gives you the data model and the events to trigger changes and it's up to the developer to decide how to display that model in the UI. This gives all the flexibility to use the technology you feel more comfortable, some use D3, others higher level libraries like Vega, Highcharts, etc.

Apart from the official docs where you have examples and a guide, you can also take a look to this blog post on using React and this other blog post on some experiments we did a few weeks ago. I participated on this one built using Vue and Vega lite for the widgets.

  • 1
    I had feared as much; I only wish that this was explicitly mentioned in the documentation. I'm sure that I'm not the only person who understands 'widget' to mean a GUI Widget. Mar 14, 2018 at 12:39
  • 1
    well the actual names for those objects are dataviews but I agree that trying to relate to BUILDER vocabulary makes this a bit confusing, sorry about that.
    – Jorge Sanz
    Mar 15, 2018 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.