# Showing and hiding parameters

If a template has parameters that are only used depending on another parameter, it is possible to dynamically show and hide them.

## Checkbox control

For example, this template adds an optional hole on top, to make a token into a keychain.

![](https://cuttle-content.imgix.net/learn/showing-and-hiding-parameters/1e66fea0d6513b84b8ec9ee786e1726a7df05a122d2380f7a661e6301bc3669c.png?auto=compress,format&q=60&fit=max&w=720&h=720&dpr=2)

When “Include Hole” is unchecked, the “Hole Size” parameter has no effect.

![](https://cuttle-content.imgix.net/learn/showing-and-hiding-parameters/27078e99990c26a116506475216688a4462b208f211a49a5424151cf0d9fe399.png?auto=compress,format&q=60&fit=max&w=720&h=720&dpr=2)

In the Editor, we can hide the “holeSize” parameter by adding this code in a new “\_hiding” parameter:

if (includeHole === false) console.hideParameter("holeSize");

Note that `includeHole` does not have quotes. In code, this is the **value** of the parameter. While `"holeSize"` does have quotes, because it is the **name** of the parameter.

![](https://content.cuttle.xyz/learn/showing-and-hiding-parameters/557f758158e50723daf2919228f9577ef86fc7a1b445d8363ca2b30ab5befcc9.gif)

Now in the Read Me embed, the “Hole Size” parameter shows and hides as needed.

## Select control

This template has different text elements, using the “Visible” modifier, depending on the value of a Select parameter.

![](https://cuttle-content.imgix.net/learn/showing-and-hiding-parameters/e0a8b94ecc0a76b6f9fd0b293ce61676f55feed09dae514fed842b7ad914d0c7.png?auto=compress,format&q=60&fit=max&w=720&h=720&dpr=2)

if (style === "Text Around") { console.hideParameter("num") } if (style === "Number") { console.hideParameter("text") }

So in the Read Me view, the applicable parameter will show, depending on the “Style” selection.

![](https://content.cuttle.xyz/learn/showing-and-hiding-parameters/2f7eb6b8d0514d17d2efc163f42602f6385e1574109fcaa022fac659b546ac4b.gif)

## Live examples

The examples in this page are [published here](https://cuttle.xyz/@cuttle/Learn-Showing-and-hiding-parameters-pkGDvWsF4IuJ).

## Caveats

Take care to only hide parameters that have no effect on the design.

You can hide multiple parameters with one call, for example

if (showThing === false) console.hideParameter("thingOne", "thingTwo")

Hiding all the parameters within a folder will hide the folder.

If your design is showing and hiding many parameters, it might be a signal to split the design into multiple templates.