Skip to content

mudoo/resi-child

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Responsive child element

3 2 1

Usage

import ResponsiveChild from 'resi-child'
import moreIcon from './icon/more.svg?raw'

new ResponsiveChild(document.querySelector('#toolbar'), {
  buttonTextMore: moreIcon,
  popover: true
})

Options

{
  buttonTextMore: 'More',
  buttonTextLess: 'Less',
  buttonClass: 'responsive-button',
  collapsedClass: 'collapsed',
  popover: false,
  clone: false,
  popoverWrapClass: 'responsive-popover-wrap',
  popoverWrapStyle: `
position: absolute;
visibility: hidden;
height: 0;
z-index: 1000;
background: #fff;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);`,
  popoverClass: 'responsive-popover',
  popoverStyle: `
padding: 10px;
width: auto;
width: fit-content;`,
  popoverContainer: document.body,
  hiddenClass: 'responsive-hide'
}

About

Responsive child element plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published