Overlay
Overlay components codify design patterns related to floating surfaces such as dialogs and menus.
Description
Overlay components codify design patterns related to floating surfaces such as dialogs and menus. They are private components intended to be used by specialized components, and mostly contain presentational logic and behavior.
Arguments
| Name | Default | Description |
|---|---|---|
id |
| StringThe id of the Overlay. |
title | N/A | StringDescribes the content of the Overlay. |
subtitle |
| StringProvides dditional context for the Overlay, also setting the |
popover |
| SymbolThe popover behaviour. One of |
size |
| SymbolThe size of the Overlay. One of |
padding |
| SymbolThe padding given to the Overlay body. One of |
anchor |
| StringAn ID of the element to anchor onto. Defaults to the |
anchor_align |
| SymbolThe anchor alignment of the Overlay. One of |
anchor_side |
| SymbolThe side to anchor the Overlay to. One of |
anchor_offset |
| SymbolThe anchor offset to give the Overlay. One of |
allow_out_of_bounds |
| BooleanAllow the Overlay to overflow its container. |
visually_hide_title |
| BooleanIf true will hide the heading title, while still making it available to Screen Readers. |
role |
| StringThe ARIA role. One of |
system_arguments | N/A | Hash |
Examples
Slots
show_button
Optional button to open the Overlay.
| Name | Default | Description |
|---|---|---|
icon | N/A | StringName of Octicons to use instead of text. If provided, a IconButton will be rendered. Otherwise a Button will be rendered. |
controls | N/A | StringThe ID of the menu this button controls. Used internally. |
button_arguments | N/A | HashThe arguments accepted by Button or IconButton depending on the presence of the |
header
Header content.
| Name | Default | Description |
|---|---|---|
divider | N/A | BooleanShow a divider between the header and body. |
size | N/A | SymbolOne of One of |
visually_hide_title | N/A | BooleanVisually hide the |
system_arguments | N/A | Hash |
body
Required body content.
| Name | Default | Description |
|---|---|---|
padding | N/A | SymbolThe padding. One of |
system_arguments | N/A | Hash |
footer
Footer content.
| Name | Default | Description |
|---|---|---|
show_divider | N/A | BooleanShow a divider between the footer and body. |
system_arguments | N/A | Hash |
Overlay::Header
A Overlay::Header is a compositional component, used to render the
Header of an overlay. See Overlay.
Arguments
| Name | Default | Description |
|---|---|---|
title | N/A | StringDescribes the content of the Overlay. |
subtitle |
| StringProvides additional context for the Overlay, also setting the |
overlay_id |
| StringProvides the id of the overlay element so the close button can close it |
size |
| SymbolThe size of the Header. One of |
divider |
| BooleanShow a divider between the header and body. |
visually_hide_title |
| BooleanVisually hide the |
system_arguments | N/A | Hash |
Overlay::Footer
A Overlay::Footer is a compositional component, used to render the
Footer of an overlay. See Overlay.
Arguments
| Name | Default | Description |
|---|---|---|
show_divider |
| BooleanShow a divider between the footer and body. |
align_content |
| SymbolThe alginment of contents. One of |
system_arguments | N/A | Hash |
Overlay::Body
A Overlay::Body is a compositional component, used to render the
Body of an overlay. See Overlay.
Arguments
| Name | Default | Description |
|---|---|---|
system_arguments | N/A | Hash |