Set visibility (Beta)
Set visibility (Beta)
element.setVisibility(visibility)
Set the visibility of an element, or bind its visibility state to a data source.
Verify that the element has the visibility property before calling this method.
Beta
These methods are in public beta and may change with future releases.
Syntax
Related types:
Parameters
visibility:boolean | BindingInput—trueto show the element orfalseto hide it. Pass aBindingInputobject to bind the visibility to a data source such as a CMS boolean field or component prop.
Returns
Promise<null>
A promise that resolves to null on success.