2.21.0Dropdown Component
The Dropdown component adds a slick, extensible, and accessible menu system.
npm install @bolt/components-dropdown
Fully interactive with and without JS enabled (including keyboard support)
  // Via Twig
{% embed "@bolt-components-dropdown/dropdown.twig" with {
  title: "Toggle Menu",
  collapse: true
} %}
  {% block content %}
    {% include "@bolt-components-nav/nav.twig" with {
      links: [
        {
        text: "Link 1 Text",
        url": "#!"
      },
      {
        text: "Link 2 Text",
        url": "#!"
      },
      {
        text: "Link 3 Text",
        url": "#!"
      }
      ]
    } %}
  {% endblock %}
{% endembed %}
// Via Web Component and Twig
<bolt-dropdown
  title="Custom Element w/ Collapse & Center"
>
  {% include "@bolt-components-nav/nav.twig" with {
    links: [
      {
        text: "Link 1 Text",
        url": "#!"
      },
      {
        text: "Link 2 Text",
        url": "#!"
      },
      {
        text: "Link 3 Text",
        url": "#!"
      }
    ]
  } only %}
</bolt-dropdown>
  Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case.
| Prop Name | Description | Type | Default Value | Option(s) | 
|---|---|---|---|---|
| title |        The toggle title text  | 
    
            string
      
      
     | — |       
  | 
  
| center |        
  | 
    
            boolean
      
      
     | 
              false
           | 
    
          
  | 
  
| collapse |        
  | 
    
            boolean
      
      
     | 
              false
           | 
    
          
  | 
  
| content |        All of the items in the dropdown -- generally works by including   | 
    
            any
      
      
     | — |       
  |