Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
<button id="overlay-show-overlay-67aafe41-01ea-4e0e-9c31-bd4f8f8e8569" popovertarget="overlay-67aafe41-01ea-4e0e-9c31-bd4f8f8e8569" 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-67aafe41-01ea-4e0e-9c31-bd4f8f8e8569" anchor="overlay-show-overlay-67aafe41-01ea-4e0e-9c31-bd4f8f8e8569" 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;
}
}