Accordion JSTwig
Table of content
Usage
Once the package installed, simply include the template in your project:
js
import { Base, createApp } from '@studiometa/js-toolkit';
import { Accordion } from '@studiometa/ui';
class App extends Base {
static config = {
name: 'App',
components: {
Accordion,
},
};
}
export default createApp(App, document.body);
twig
{% set items = [
{
title: 'Title #1',
content: 'Content #1'
},
{
title: 'Title #2',
content: 'Content #2'
},
{
title: 'Title #3',
content: 'Content #3'
}
] %}
{% include '@ui/molecules/Accordion/Accordion.twig' with { items: items } %}