If you are referring to Clientlibs, it's necessary to set values in HTML, which can be done through various ways such as hidden fields, JavaScript properties, etc.
However, if you are talking about the JavaScript Use API, you can access component dialog values using properties.get("title"), assuming the dialog field name "./title". You can refer to this link for more detailed information: https://varunaem.blogspot.com/2019/06/javascript-use-api.html
use(function () {
var title = properties.get("title");
// Now you can use the "title" variable in your logic
return {
// Your Model Data
};
});Nevertheless, it's recommended to use Sling Models. You can retrieve the component dialog value within a Sling Model, perform any necessary logic, and then return only the required value to be included in the HTML.