# View as Property in Perspective Component

**URL:** <https://forum.inductiveautomation.com/t/view-as-property-in-perspective-component/66860>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [November 23, 2022, 4:23pm UTC](https://forum.inductiveautomation.com/t/view-as-property-in-perspective-component/66860 "2022-11-23T16:23:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 23, 2022, 4:34pm UTC](https://forum.inductiveautomation.com/t/view-as-property-in-perspective-component/66860/2 "2022-11-23T16:34:25Z")

</div>

For the JSON editor support, you just need to specify a `format` of `view-path` in your schema:

```auto
            "path": {
              "type": "string",
              "format": "view-path",
              "description": "Path to the view that will be used as the display for the control.",
              "default": ""
            },

```

At the JSX/React level, you embed a `<View>` from `@inductiveautomation/perspective-client`... which I'm not sure if you have access to? I don't know off the top of my head the publishing situation for our TS libs.  
But, in theory:

```auto
                containerContent = (
                    <div>
                        <View
                            key={PageStore.instanceKeyFor(view.path, mountPath)}
                            store={this.props.store.view.page.parent}
                            mountPath={mountPath}
                            resourcePath={view.path}
                            outputListener={onViewOutputChanged}
                            params={view.params}
                            useDefaultWidth={true}
                            useDefaultHeight={true}
                        />
                        <ReactResizeDetector
                            handleHeight={true}
                            handleWidth={true}
                            onResize={this.updateViewContainerDimensions(ref)}
                        />
                    </div>
                );

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/view-as-property-in-perspective-component/66860)._
