Skip to main content
16-Pearl
July 30, 2025
Solved

How to dynamically apply a CSS class to a widget in Vuforia Studio?

 

Hi everyone,
I'm trying to apply a custom CSS class to a widget (e.g., textArea-2) in Vuforia Studio using JavaScript.
Here’s what I tried:

 

 
 
let redPlateDescriptionClass = 'redBackGroundClass';
 
$scope.view.wdg["textArea-2"].class = redPlateDescriptionClass;
 

But this doesn’t seem to work. Is there a correct way to assign a class dynamically in Vuforia Studio?

Thanks in advance!

16-Pearl
August 5, 2025

Fortunately it works in ipad and thats what we wanted. In browser the class could not get executed.

1 reply

Jamal Ashraf16-PearlAuthorAnswer
16-Pearl
August 5, 2025

Fortunately it works in ipad and thats what we wanted. In browser the class could not get executed.

Translate