Window
A window with a title bar and three control buttons. Minimizing hides the window, maximizing makes it fill the screen and closing removes it from the page.
Import
Importing the library registers <pix-window>.
import '@halleyfante/pix';Basic
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
label | string | '' | Text shown in the title bar. |
minimized | boolean | false | Hides the window while it stays open. Remove it to show the window again. |
maximized | boolean | false | Makes the window fill the screen. |
inactive | boolean | false | Marks the window as not being the one in use, which mutes its title bar. |
Methods
| Method | Description |
|---|---|
close(): void | Fires the close event and removes the window from the page, unless the event is cancelled. |
minimize(): void | Hides the window, keeping it open, and fires the minimize event. |
Events
| Name | Description |
|---|---|
minimize | The window was minimized. |
maximize | The window was maximized or restored to its size. |
close | The window is about to be removed from the page. Cancel the event to keep it. |
Style properties
| Name | Description |
|---|---|
--pix-window-inset-bottom | Height left free under a maximized window, for a taskbar. |
Slots
| Name | Description |
|---|---|
| default | Content of the window. |