Add demo example
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
__What should we do?__
We should add a working demo example for this project to showcase how to integrate it.
__Why should we do it?__
It would make it easier for our users to consume this library.
__Original Text__
I am having trouble implementing this in my custom web component. Is there a working demo some where? I have the module imported, and I don't get an errors, but I simple get a UL list on the page, not tabs let alone no scrolling.
I am doing something a little different from the doc. I have my div and UL in my template, then after it is rendered I get a reference to it and then call the create function
```
var div = this.shadowRoot.querySelector("div")
this.scroller = tabScroller(div, {
selectors: {
tabsContainer: '.my-tabs-container',
tab: '.my-tab',
ignore: '.ignore-me',
active: '.i-am-active'
}
});
return html`
div{width:${this.width}px;}
- one
- two
- three
`;
```
** only relevant portions of the code included
Contributor guide
Research direction
Start at the tabScroller entry point and review the existing documentation referenced by the report to understand the expected markup and initialization timing. Add a runnable integration demo using the reported custom-element setup; done means users can follow it and see working tabs with scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100