Taskbar

A taskbar in the style of Windows 11. The start button and one button for each open window of the `pix-application` elements on the page sit in the centre, and the language, the time and the date sit on the right. A short line under a button shows that the window is open, and it grows under the window in use. Each application with open windows has one button. With a single window, pressing the button brings the window back in front when it is minimized or behind another one, and minimizes it when it is the window in use. With several windows, as in Windows, the button looks like a stack, and hovering or pressing it shows a small preview of each window above the bar, to choose which one to show or to close. The button disappears when the last window is closed. The start button opens a start menu like the one of Windows 11: a search box, a grid with every application of the page, and a footer with the user and a power button that shows its name. Choosing an application opens a new window of it. The search box next to the start button finds the applications of the page by name. Choosing one, with a click or with Enter, opens a new window of it. The language button shows the first three letters of the name of the language, as Windows does, and opens a menu with the languages to choose from.

Import

Importing the library registers <pix-taskbar>.

import '@halleyfante/pix';

Basic

Attributes

NameTypeDefaultDescription
localestring''Language tag used for the language label, the time and the date, such as `en` or `pt-BR`. Defaults to the language of the page.
search-labelstring'Search'Text shown inside the empty search boxes. Defaults to `Search`.
power-labelstring'Power'Text of the power button, shown next to its icon. Defaults to `Power`.
languagesstring''Language tags offered in the language menu, separated by spaces, such as `en pt-BR es`. Defaults to the current language only.

Events

NameDescription
languageA language was chosen in the menu. `event.detail.locale` holds its language tag.
name
startThe start menu was opened.
powerThe power button of the start menu was pressed.

Slots

NameDescription
userThe person using the desktop, shown at the bottom of the start menu, such as an avatar and a name.