Skip to content

Commit a7dc4d9

Browse files
committed
WIP
1 parent 0bfd0f0 commit a7dc4d9

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/pages/docs/v4-beta.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,31 @@ This works with any variant where it makes sense, including `group-*`, `peer-*`,
11661166

11671167
The new `starting` variant adds support for the new CSS `@starting-style` feature, making it possible to transition element properties when an element is first displayed:
11681168

1169+
```html {{example: {hint: 'Click the button to see the popover animate in'}}}
1170+
<div class="relative pt-8 pb-12 grid justify-center">
1171+
<button popovertarget="my-popover" class="rounded-lg bg-blue-600 hover:bg-blue-500 text-white shadow px-2.5 py-1 font-semibold">Check for updates</button>
1172+
<div popover id="my-popover" class="rounded-md bg-blue-50 p-4 opacity-0 transition-all [transition-behavior:allow-discrete] duration-500 [&:is([open],:popover-open)]:opacity-100 [@starting-style]:[&:is([open],:popover-open)]:opacity-0">
1173+
<div class="flex">
1174+
<div class="shrink-0">
1175+
<svg class="size-5 text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>
1176+
</div>
1177+
<div class="ml-3 flex-1 md:flex md:justify-between">
1178+
<p class="text-sm text-blue-700">A new software update is available: v2.0.4.</p>
1179+
<p class="mt-3 text-sm md:mt-0 md:ml-6">
1180+
<a href="#" class="font-medium whitespace-nowrap text-blue-700 hover:text-blue-600">
1181+
Update
1182+
<span aria-hidden="true"> &rarr;</span>
1183+
</a>
1184+
</p>
1185+
</div>
1186+
</div>
1187+
</div>
1188+
</div>
1189+
```
1190+
11691191
```html
11701192
<div>
1171-
<button popovertarget="my-popover">Open Popover</button>
1193+
<button popovertarget="my-popover">Check for updates</button>
11721194
<div popover id="my-popover" class="opacity-0 transition-all duration-500 [transition-behavior:allow-discrete] open:opacity-100 starting:open:opacity-0">
11731195
<!-- ... -->
11741196
</div>

0 commit comments

Comments
 (0)