Skip to content

Conditional Rendering

The g-if directive is a feature in Graphane that allows you to conditionally display elements based on a boolean value. It provides a simple way to toggle the visibility of SVG elements.

In this example, the g-if directive is applied to a <g> element. The data.isVisible is a boolean value or expression that determines whether the element should be displayed or hidden. When the value of isVisible is true, the circle will be displayed. If the value is false, the element will be hidden and effectively removing it from view.

Released under the MIT License.