By Anders (Clark || Ringqvist)
In 2022 the <dialog>
html element received widespread support in all major browsers. The popover
property received the same in April 2024. These features help make modals, popups, context-menus, tooltips and more accessible, performant and MUCH less reliant on Javascript.
This repository contains some explorations into how to use the Popover API as well as the <dialog>
element, which overlaps in function somewhat.
Requires NPM
git clone https://github.com/Andersclark/popover-examples.git && cd popover-examples && npm install && npm run dev
- Clone repo:
git clone https://github.com/Andersclark/popover-examples.git
- Move terminal inside repo:
cd popover-examples
- Install dependencies:
npm install
- Start development server:
npm run dev
- Navigate browser to address displayed in terminal