Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
<button id="overlay-show-overlay-92a0725d-2dbe-4af4-9fc4-a001fb25b7fb" popovertarget="overlay-92a0725d-2dbe-4af4-9fc4-a001fb25b7fb" 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-92a0725d-2dbe-4af4-9fc4-a001fb25b7fb" anchor="overlay-show-overlay-92a0725d-2dbe-4af4-9fc4-a001fb25b7fb" 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
26
27
anchored-position[popover] {
border-width: 0;
padding: 0;
position: absolute;
min-width: 192px;
overflow: visible;
}
anchored-position:not(.Overlay) {
background: none;
}
/* stylelint-disable-next-line selector-pseudo-class-no-unknown */
.Overlay[popover]:not(:popover-open) {
display: none
}
anchored-position.not-anchored::backdrop, dialog::backdrop {
background-color: var(--overlay-backdrop-bgColor, var(--color-neutral-muted));
}
@media (forced-colors: active) {
.Overlay {
outline: solid 1px transparent;
}
}