Sidebar Modal

A typical "sidebar" modal (JS variant), for left/right content types.

Dependencies

This component uses the following to create the full UI.

JS:
Note:

This component *needs* javascript to be enabled and to load correctly to work.

Basic Example

A typical "sidebar" type modal, using Alpine JS to toggle state between open and closed. Includes all necessary adjustment of aria attributes for accessibility.

Alignment

The sidebar modal can be aligned on the left or the right of the viewport.

Modal Header and Footer

Add a header and/or footer area to the sidebar body.

Close

Add a close button to the modal, inside and outside the main body.

Modal Bar

Add a separated "bar" to the side of a modal, used for displaying extra buttons.

Work in progress

Nested Drawers

Deeper section drawers to break up content into smaller chunks.


Useful notes and reading:

Related components:

Useful Links: