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.
Block name
t2/state-toggle
Properties (t2.json)
features
Allowed icon list.
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" /-->