Skip to content

Mamaduka/toggles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fb09c52 · Jun 17, 2023

History

41 Commits
Feb 8, 2021
Feb 14, 2022
Jun 17, 2023
Jun 11, 2020
Jun 11, 2020
Jun 11, 2020
Feb 5, 2021
Jun 17, 2023
Jun 17, 2023
Jun 17, 2023
Jun 17, 2023
Jun 17, 2023

Repository files navigation

Toggles

An easy way to hide and reveal content.

You can use this block to hide and reveal content as needed. Create FAQ pages, hide spoilers in posts, or create simple accordion elements.

The block uses <details> and <summary> HTML elements and doesn't require any additional JavaScript or CSS on the theme side.

Frequently Asked Questions

Want to change default styles?

You can add some basic styling with just a few lines of CSS. Example:

.wp-block-toggles {
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 3px;
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
}

.wp-block-toggles summary {
    cursor: pointer;
}