Open Source DOM Component
All the usual suspectsby Read Write Tools
|The rwt-lineup DOM component is a flexible menu using round images as hyperlinks, with a pullbar to expand items that have overflowed its single-line container.|
Sometimes a visual menu is better than a textual menu.
The rwt-lineup DOM component applies circular styling to square images, providing a fully iconic interface. For situations where there are too many hyperlinks to fit in a single line, the extras are kept hidden until activated by the user, using either the visual pullbar or the component's
toggleMenu method or through its event interface.
This component is a light-hearted take on "The Line Up" of "all the usual suspects". It's designed for use in a website's top banner area.
The component has these features:
- A single line of icons is displayed in the container's collapsed state. The full set of icons is display in the expanded state, accommodating any number of menu items.
- The menu item corresponding to the current page is highlighted and scrolled into view when the page is loaded.
- The menu has an event interface for expanding and collapsing itself.
- The menu emits a custom event to close sibling menus and dialog boxes.
- Menu items may be kept separate from the DOM component, allowing the webmaster to change its contents in a single centralized place. Alternatively, menu items may be slotted directly between the component's opening and closing tags.
- A keyboard listener is provided to allow a shortcut key to expand/collapse the menu.
- A half-height pullbar for expanding the container is displayed along the bottom margin, appearing larger on hover.
- The first few times that a visitor interacts with your website, the pullbar pulses to draw attention to itself.
In the wild
To see an example of this component in use, visit the DOPPELMARKS website. It uses this component at the top of the page. To understand what's going on under the hood, use the browser's inspector to view the HTML source code and network activity.
|Documentation||READ WRITE HUB|
|Component catalog||DOM COMPONENTS|
|Publication venue||READ WRITE STACK|