Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
<button id="overlay-show-overlay-f32c4cac-88bf-4e6c-91e1-d59d776da4a6" popovertarget="overlay-f32c4cac-88bf-4e6c-91e1-d59d776da4a6" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Show Overlay Menu</span>
</span>
</button>
<anchored-position role="menu" id="overlay-f32c4cac-88bf-4e6c-91e1-d59d776da4a6" anchor="overlay-show-overlay-f32c4cac-88bf-4e6c-91e1-d59d776da4a6" align="center" side="outside-bottom" anchor-offset="normal" popover="auto" aria-label="Menu" data-view-component="true">
<div data-view-component="true" class="Overlay Overlay--size-auto">
<div data-view-component="true" class="Overlay-body">This is a menu</div>
</div>
</anchored-position>
1
2
3
4
5
6
7
8
9
10
11
12
render(Primer::Alpha::Overlay.new(
title: "Menu",
role: :menu,
size: size,
padding: padding,
anchor_align: anchor_align,
anchor_side: anchor_side,
allow_out_of_bounds: allow_out_of_bounds
)) do |d|
d.with_show_button { button_text }
d.with_body { body_text }
end
Param Description Input

app/components/primer/alpha/overlay.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* stylelint-disable selector-max-type, selector-no-qualifying-type */
anchored-position[popover] {
position: absolute;
min-width: 192px;
padding: 0;
overflow: visible;
border-width: 0;
}
anchored-position:not(.Overlay) {
background: none;
}
.Overlay[popover]:not(:popover-open) {
display: none
}
anchored-position.not-anchored::backdrop, dialog::backdrop {
background-color: var(--overlay-backdrop-bgColor, var(--color-neutral-muted));
}
select-panel dialog::backdrop {
background: none;
}
@media (forced-colors: active) {
.Overlay {
outline: solid 1px transparent;
}
}