0.6.3 • Published 5 years ago

@vcl/drawer v0.6.3

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

VCL drawer

Sliding sidebar.

Features

Sliding drawer panel and main panel. In closed state, only the main area is visible.

Visibility of the drawer is explicitly controlled via modifiers, no implicit media-query magic.

The slide in/ out of the drawer is animated.

Usage

In this example, the drawer is closed and only the main panel is visible.

closed example

In this example, the drawer panel is open via the vclOpen modifier and the inline style left: 0; on the vclDrawerMainPanel. This rule makes the main panel appear below the drawer panel. This is intended for narrow viewports.

narrow example

For wide viewports, the drawer can be shown next to the main panel just by removing the rule as in the example below.

wide example

There are no modifier classes for this as it requires highly dynamic control and should better handled programmatically in the web component.

The drawer panel can also be laid out to the right of the main panel using the vclDrawerRight modifier.

Classes

  • vclDrawer
  • vclDrawerDrawerPanel
  • vclDrawerMainPanel
  • vclDrawerMainPanelContent
  • vclDrawerMainPanelCover

Modifiers

  • vclOpen: To open the panel.
  • vclClose: Must be toggled with vclClose to play animations properly.
  • vclDrawerRight: To lay-out the panel to the right of the main panel.

Variables

  • --drawer-drawer-panel-color
  • --drawer-drawer-panel-bg-color
  • --drawer-drawer-panel-width
  • --drawer-main-panel-cover-bg-color

Demo

example.html on GH-pages.

1.0.0-alpha.2

5 years ago

0.7.0-alpha.3

5 years ago

0.7.0-alpha.1

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0-6

5 years ago

0.6.0-1

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.2

6 years ago

0.4.0

6 years ago

0.4.0-beta.3

6 years ago

0.4.0-beta.1

6 years ago

0.4.0-beta.0

6 years ago

0.4.0-0

6 years ago

0.3.0-0

6 years ago

0.3.0-2

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

7 years ago