{"id":19346827,"url":"https://github.com/juicy/juicy-highlight","last_synced_at":"2026-02-20T17:30:48.664Z","repository":{"id":17013857,"uuid":"19777279","full_name":"Juicy/juicy-highlight","owner":"Juicy","description":"Custom Element that highlights a DOM element on screen using a SVG overlay and/or border","archived":false,"fork":false,"pushed_at":"2018-01-18T15:28:13.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-02-06T15:04:16.007Z","etag":null,"topics":["plain-js","used-in-starcounter-app"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/Juicy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-14T11:44:27.000Z","updated_at":"2022-03-10T22:34:11.000Z","dependencies_parsed_at":"2022-07-26T11:47:14.859Z","dependency_job_id":null,"html_url":"https://github.com/Juicy/juicy-highlight","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juicy%2Fjuicy-highlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juicy%2Fjuicy-highlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juicy%2Fjuicy-highlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juicy%2Fjuicy-highlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Juicy","download_url":"https://codeload.github.com/Juicy/juicy-highlight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240457945,"owners_count":19804489,"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":["plain-js","used-in-starcounter-app"],"created_at":"2024-11-10T04:12:38.590Z","updated_at":"2025-10-16T16:41:53.299Z","avatar_url":"https://github.com/Juicy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u0026lt;juicy-highlight\u0026gt;\n\n`\u003cjuicy-highlight\u003e` is a Custom Element that highlights a DOM element on screen using a SVG overlay and/or border\n\n## Demo\n\n[Check it live!](http://juicy.github.io/juicy-highlight)\n\n## Usage\n\n1. Install the component using [Bower](http://bower.io/):\n\n    ```sh\n    $ bower install juicy-highlight --save\n\t```\n\n2. Import Custom Element:\n\n    ```html\n    \u003clink rel=\"import\" href=\"bower_components/juicy-highlight/juicy-highlight.html\"\u003e\n    ```\n\n3. Start using it!\n\n    ```html\n    \u003cjuicy-highlight id=\"border\" strokeWidth=\"2\" strokeColor=\"#222222\" strokeOffset=\"4\"\u003e\u003c/juicy-highlight\u003e\n    \u003cscript\u003e\n\t\tdocument.addEventListener(\"DOMContentLoaded\", function() {\n\t\t\tsetTimeout(function() {\n\t\t\t\tdocument.querySelector(\"#border\").show(document.querySelectorAll(\"li\"));\n\t\t\t}, 100);\n\t\t});\n\t\u003c/script\u003e\n    ```\n\n## Attributes\n\nAttribute         | Type           | Default      | Description\n---               | ---            | ---          | ---\n`overlay`         | *Boolean*      | `false`      | Whether the overlay should be displayed\n`strokeWidth`     | *Number*       | `1`          | Border width in px\n`strokeColor`     | *String*       | `#000000`    | Border color\n`strokeOffset`    | *Number*       | `1`          | Border offset (distance from the element) in px\n`fill`            | *Color*        | `none`       | Color to fill selected area. Accepts HEX `#FFFF00`, RGB `rgb(255,255,0)`, RGBA `rgba(255,255,0,0.5)`, and color name `yellow`.\n\n## Private properties\n\nProperty      | Type  | Description\n---           | ---   | ---\n`overlayRect` | *SVG* | The overlay SVG element.\n`focusRect`   | *SVG* | The focus SVG element.\n\n## Methods\n\nName               | Param name | Type                                     | Description\n---                | ---        | ---                                      | ---\n`show`             |            |                                          | Highlight element(s)\n                   | elements   | *null*, *Element*, *Array* or *NodeList* | DOM element or array of those to highlight. If no elements are specified, only overlay will be shown (if applicable)\n`hide`             |            |                                          | Hide current highlight\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -m 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuicy%2Fjuicy-highlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuicy%2Fjuicy-highlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuicy%2Fjuicy-highlight/lists"}