Some components are often dynamically created by nature, so we created functions to create them individually from your Javascript file. These components are:

<ul class="Vlt-list Vlt-list--simple">
	<li>accordion</li>
	<li>tooltip</li>
	<li>modal</li>
</ul>


```javascript
Volta.[element-listed-above].create('elementID');
```

<hr/>

## Modals

Modals also have open and close functions:

```javascript
var myModal = Volta.modal.create('modalID')

myModal.open()
myModal.dismiss()

```

<hr/>

## Accordions

Accordions have a toggle function:

#### Styled accordions

```javascript
//Element is the Vlt-accordion element
var defaultAccordion = Volta.accordion.create(Element); 

//You can choose to toggle the accordion yourself, by passing true as the second parameter
var defaultAccordion = Volta.accordion.create(Element, true); 
//when toggling the accordion you need to pass the Vlt-accordion__trigger that was clicked as the parameter
defaultAccordion.toggle(Element);

```

#### Unstyled accordions

```javascript
//Element is the Vlt-js-accordion__content element
var jsAccordion = Volta.accordion.create(Element); 

//You can choose to toggle the accordion yourself, by passing true as the second parameter
var jsAccordion = Volta.accordion.create(Element, true); 
jsAccordion.toggle();

```

<hr/>

## Flashes

Flashes can be triggered manually:

```javascript
//flashId: the id of your Vlt-flash element
//time(optional): number of milliseconds you want the flash to be visible, defaults to 5000
Volta.flash.show('flashId', 'time');

```

<hr/>

## Dismissing Callouts

Callouts can be dismissed manually:

```javascript
//'Element' is the 'Vlt-callout' element
Volta.callout.dismiss('calloutID');
```
