# Toggle Component ![toggle](toggle.gif) ## Usage ```js import { Toggle } from "tailwindcss-stimulus-components" application.register('toggle', Toggle) ``` ```html
What is the question?
``` In this example, clicking the question will toggle the hidden class. The hidden class is the default. If you wish to use a different class, you can use the `data-toggle-class="custom-class"` attribute. ```html
What is the question?

This is the answer

``` On some cases, you don't want to toggle something but rather do one action such as only show or hide the toggleable. the toggle controller exposes two such methods named `hide` and `show` this will only hide the toggleable. ```html
What is the question?
``` while this only shows it ```html
What is the question?
```