Referencing themes within custom components

I’m creating a custom component for the first time, but having some difficulties with styling. By default, it looks like all of the text within a custom component renders with the browsers default font family. Is there a way to reference Retool’s theme properties within a custom component? I have not been able to find a way.

One workaround I tried was to pass in the theme object as a setting/state property into the custom component, but unfortunately it looks like the theme object does not contain font family information, only font size/weight and color information.

1 Like

Hi @edahlseng,

I was checking out the docs on the theme object and although it has a .defaultFont property, but this is missing the font name and only has the size/weight and color as you mentioned.

I can check with our engineers about this and make a bug report if needed :+1: