State Toggle

Display a button for toggeling visibility for any element; menu, search field, filters etc.

Last modified: May 21, 2024

See PR https://github.com/DekodeInteraktiv/T2/pull/4309 for usage examples.

link Block name

t2/state-toggle

link Properties (t2.json)

link

features

link Usage

<!-- wp:t2/state-toggle {"key":"menu-open","text":"Menu","ariaLabel":"Open menu"} /-->
<!-- wp:t2/state-toggle {"key":"header-search-open","text":"Search","icon":"search","activeText":"","ariaLabel":"Open search" /-->
<!-- wp:t2/state-toggle {"key":"filters-open","text":"Filters","icon":"filters","activeText":"Filters" /-->