@ecl/inpage-navigation
v5.0.0-alpha.22.3
Published
ECL Inpage navigation
Readme
ECL Inpage navigation
npm package: @ecl/inpage-navigation
npm install --save @ecl/inpage-navigationParameters
Parameters:
- color_mode (string) (default: '') Name of the color mode
- "id" (string) (default: random)
- "title" (string) (default: '')
- "links" (associative array) (default: predefined structure):
- href: (string) (default: '')
- label: (string) (default: '')
- "icon_size" (string) (default: 'xs') size of the toggle icon
- "extra_classes" (optional) (string) (default: '') Extra classes (space separated)
- "extra_attributes" (optional) (array) (default: []) Extra attributes
- "name" (string) Attribute name, eg. 'data-test'
- "value" (string) Attribute value, eg: 'data-test-1'
Example:
{% include '@ecl/inpage-navigation/inpage-navigation.html.twig' with {
title: 'Page contents',
links: [
{
href: "#inline-nav-1",
label: "Heading 1"
},
{
href: "#inline-nav-2",
label: "Heading 2"
},
{
href: "#inline-nav-3",
label: "Heading 3"
},
{
href: "#inline-nav-4",
label: "Heading 4"
},
],
} %}