Programmatically change the content of the file field

I haven’t seen Pages Field in the UI Kits.
Otherwise, how can I work with the field and hang an event listener on it?