You can select and manipulate A-Frame entities and components as you would any other HTML.

Vanilla JavaScript

.setAttribute('material', 'color', 'red')

With Libraries

With libraries…

$('a-box').attr('width', 5);'a-scene').selectAll('').data(data);


A-Frame exposes its public interface through the window.AFRAME browser global. This same interface is exposed if requiring with NPM (require(‘aframe’);). AFRAME can be used to register new things and extend AFRAME’s capabilities.

Further reading: