> For the complete documentation index, see [llms.txt](https://jsf.gitbook.io/jsf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jsf.gitbook.io/jsf/layout/layout-options/show-and-hide.md).

# Show & hide

With `visibleIf` keyword, you can conditionally hide portions of the form.

### Interface

| Option         | Type       |                                                                                                                             |
| -------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------- |
| `$eval`        | `string`   | Your JS code to determine if layout should be displayed. Code must return `true` or `false`. Do not forget to return value! |
| `dependencies` | `string[]` | If your code depends on changes of other properties in schema, list them here.                                              |

### Example

Example showing image only if `showImage` checkbox is checked.

```javascript
{
  "schema": {
    "type": "object",
    "properties": { "showImage": { "type": "boolean" } }
  },
  "layout": {
    "type": "div",
    "items": [
      { "type": "image", "src": "http://example.org/image.png",
        "visibleIf": {
          "$eval": "return $val.showImage == true",
          "dependencies": [  "showImage" ]
        }
      }
    ]
  }
}
```
