PricingBlog

Is there a way to get the attributes of a web component?

  • tomthebigtree-1277609304463114362

    Tom Ireland

    1 year ago

    In my Carrd-style app, I'm looking to build a component that gets the attribute names and types of child components. For example, my hero component has the attributes heading and text , both of which take a string. Is there a way to dynamically obtain these to then create some kind of attribute control component?

    This might also be useful for @Victor Giron (for the future) when working on his UI kit so that each component has a set of controls that can be adjusted on the screen to preview the component before copying it.
  • tomthebigtree-1277611668352012381

    Tom Ireland

    1 year ago