@parsonic/back-to-top
Version:
Scroll back to top of page web component
110 lines (109 loc) • 2.89 kB
JSON
{
"schemaVersion": "2.1.0",
"readme": "README.md",
"modules": [
{
"kind": "javascript-module",
"path": "src/BackToTop.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "BackToTop",
"cssParts": [
{
"description": "Style the default button element",
"name": "button"
},
{
"description": "Style the default icon svg",
"name": "icon"
}
],
"slots": [
{
"description": "Default slot for the back to to button",
"name": ""
},
{
"description": "Slot for a custom button icon",
"name": "icon"
}
],
"members": [
{
"kind": "method",
"name": "register",
"static": true,
"parameters": [
{
"name": "tagName",
"default": "'back-to-top'"
}
]
}
],
"attributes": [
{
"type": {
"text": "string"
},
"description": "ARIA label for the button",
"name": "data-button-label"
},
{
"type": {
"text": "string"
},
"description": "The id of an element to focus when the button is clicked",
"name": "data-focus-target"
},
{
"type": {
"text": "string"
},
"description": "The scroll behavior to use when scrolling to top",
"name": "data-scroll-behavior"
},
{
"type": {
"text": "string"
},
"description": "The id of the container element being scrolled if not the main window",
"name": "data-scroll-container"
},
{
"type": {
"text": "string"
},
"description": "Only show the button after scrolling beyond the threshold",
"name": "data-threshold"
}
],
"superclass": {
"name": "HTMLElement"
},
"customElement": true
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "BackToTop",
"module": "src/BackToTop.js"
}
},
{
"kind": "custom-element-definition",
"name": "back-to-top",
"declaration": {
"name": "anonymous_0",
"module": "src/index.js"
}
}
]
}
]
}