{"id":13724907,"url":"https://github.com/stefanjudis/web-vitals-element","last_synced_at":"2025-04-06T21:14:58.186Z","repository":{"id":38280118,"uuid":"279399005","full_name":"stefanjudis/web-vitals-element","owner":"stefanjudis","description":"A custom element to display web vitals metrics on your page.","archived":false,"fork":false,"pushed_at":"2023-08-15T05:05:17.000Z","size":1001,"stargazers_count":183,"open_issues_count":7,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T04:58:41.250Z","etag":null,"topics":["custom-elements","web-vitals"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanjudis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-13T19:56:54.000Z","updated_at":"2024-12-09T04:40:29.000Z","dependencies_parsed_at":"2024-01-09T11:17:22.972Z","dependency_job_id":null,"html_url":"https://github.com/stefanjudis/web-vitals-element","commit_stats":{"total_commits":53,"total_committers":5,"mean_commits":10.6,"dds":0.2075471698113207,"last_synced_commit":"90e966feae2ad549c168be42cb939fb3a7ce1521"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanjudis%2Fweb-vitals-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanjudis%2Fweb-vitals-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanjudis%2Fweb-vitals-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanjudis%2Fweb-vitals-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanjudis","download_url":"https://codeload.github.com/stefanjudis/web-vitals-element/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550690,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-elements","web-vitals"],"created_at":"2024-08-03T01:02:06.285Z","updated_at":"2025-04-06T21:14:58.166Z","avatar_url":"https://github.com/stefanjudis.png","language":"JavaScript","funding_links":[],"categories":["Real World","JavaScript"],"sub_categories":["Components"],"readme":"# web-vitals-element\n\n\u003e Bring [web vitals](https://github.com/GoogleChrome/web-vitals) quickly into your page using custom elements\n\n![web-vitals-element in styled and unstyled version](./screenshot.png)\n\n[See it in action on CodePen](https://codepen.io/stefanjudis/pen/wvGzvWx).\n\n## Basic usage\n\n```html\n\u003c!-- Include the custom element script --\u003e\n\n\u003c!-- Unstyled (installed locally) --\u003e\n\u003cscript src=\"node_modules/web-vitals-element/dist/web-vitals-element.min.js\"\u003e\u003c/script\u003e\n\u003c!-- Unstyled from unpkg.com --\u003e\n\u003cscript src=\"https://unpkg.com/web-vitals-element@latest/dist/web-vitals-element.min.js\"\u003e\u003c/script\u003e\n\u003c!-- Unstyled from skypack --\u003e\n\u003cscript type=\"module\"\u003e\n  import 'https://cdn.skypack.dev/web-vitals-element';\n\u003c/script\u003e\n\n\u003c!-- Styled (installed locally) --\u003e\n\u003cscript src=\"node_modules/web-vitals-element/dist/web-vitals-element.styled.min.js\"\u003e\u003c/script\u003e\n\u003c!-- Styled from unpkg.com --\u003e\n\u003cscript src=\"https://unpkg.com/web-vitals-element@latest/dist/web-vitals-element.styled.min.js\"\u003e\u003c/script\u003e\n\u003c!-- Styled from skypack --\u003e\n\u003cscript type=\"module\"\u003e\n  import 'https://cdn.skypack.dev/web-vitals-element/styled';\n\u003c/script\u003e\n```\n\n_The element does not render shadow DOM. You can style it like any other element in your HTML page._\n\nAfter loading the element script, use the `web-vitals` element in your HTML.\n\n```html\n\u003c!-- Basic usage --\u003e\n\u003cweb-vitals\u003e\u003c/web-vitals\u003e\n\n\u003c!-- Define the metrics you care about --\u003e\n\u003cweb-vitals cls fcp fid lcp ttfb\u003e\u003c/web-vitals\u003e\n\n\u003c!-- Show message about not support metrics --\u003e\n\u003cweb-vitals show-unsupported\u003e\u003c/web-vitals\u003e\n```\n\nCurrently supported metrics: `cls`, `fcp`, `fid`, `lcp`, `ttfb`. Read more about these in [the web-vitals documentation](https://github.com/GoogleChrome/web-vitals).\n\n## Contributing\n\n_I'd love to see more themes for the web vitals element box – the fancier the better!_ If you're interested in contributing some fancy looks, please [open an issue](https://github.com/stefanjudis/web-vitals-element/issues/new).\n\n## Code of conduct\n\nThis project underlies [a code of conduct](./CODE-OF-CONDUCT.md).\n\n## License\n\nThis project is released under [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanjudis%2Fweb-vitals-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanjudis%2Fweb-vitals-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanjudis%2Fweb-vitals-element/lists"}