Details Field
The Details Field module adds a new field type to Drupal that allows editors to easily create and display "details" elements. These elements can be added to any entity and allow for content to be shown or hidden, similar to an accordion.
Details Field provides a tailored field type, widget and formatter that allows easily creating and displaying details elements.
After installing and enabling the module, a new field type called Details element will be available under the Formatted text category. This field type can be used for any entity type, such as nodes, blocks, paragraphs.
The module also provides a customised field widget that allows editors to easily create and manage details elements, setting the summary, content, and attributes to determine the details behaviour and functionality as per the element definition.