{"id":13701353,"url":"https://github.com/pshihn/lumin","last_synced_at":"2025-04-04T19:04:59.289Z","repository":{"id":54740014,"uuid":"135647632","full_name":"pshihn/lumin","owner":"pshihn","description":"A JavaScript library to progressively highlight any text on a page.","archived":false,"fork":false,"pushed_at":"2021-02-01T14:23:51.000Z","size":301,"stargazers_count":545,"open_issues_count":3,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T18:13:06.855Z","etag":null,"topics":["highlight","highlighting","javascript"],"latest_commit_sha":null,"homepage":"https://lumin.rocks","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/pshihn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-01T00:15:32.000Z","updated_at":"2025-03-22T20:33:32.000Z","dependencies_parsed_at":"2022-08-14T01:20:35.137Z","dependency_job_id":null,"html_url":"https://github.com/pshihn/lumin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pshihn%2Flumin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pshihn%2Flumin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pshihn%2Flumin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pshihn%2Flumin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pshihn","download_url":"https://codeload.github.com/pshihn/lumin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"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":["highlight","highlighting","javascript"],"created_at":"2024-08-02T20:01:31.944Z","updated_at":"2025-04-04T19:04:59.255Z","avatar_url":"https://github.com/pshihn.png","language":"JavaScript","readme":"# LuminJS\nA JavaScript library to progressively highlight any text on a page.\n\nGreat for when you want users to pay attention to some important text.\u003cbr\u003e It can also be used to show progress of a task − Read something while tasks are being completed.\n\nRelated buzz words: _Tiny (~1kB gzipped)_, _No-dependency_\n\nVisit [lumin.rocks](https://lumin.rocks/) to see it in action.\n\n![Demo gif](https://lumin.rocks/images/highlight.gif)\n\n**Note**: This does NOT modify the user selection. \n\n## Install\n\nDownload the latest from [dist folder](https://github.com/pshihn/lumin/tree/master/dist)\n\nor from npm:\n```\nnpm install --save lumin\n```\n\n## Usage\n\nInstantiate **lumin** with a node. All text under that node, including child nodes, will be highlighted. Then call *start* to start highlighting.\n\n```javascript\nconst luminator = lumin(domNode);\nluminator.start(5000); // 5000ms to highlight\n```\n\nOr you can manually control the progress\n```javascript\n// Set progress to 50%\nluminator.progress = 50;\n```\n\n**Note**: _The node being instantiated with has to be a positioned node. i.e. position is not static for this to work. In most cases, **position:relative** will do the trick._\n\n## Full API\n\n### progress\n\nNumeric property one can set to indicate the progress of the highlight. The value is in percentage (0 to 100). This is useful when showing a progress of a task, e.g., a file upload. \n\n### start(duration)\n\nStart the highlight.\n\n_duration_ is the approximate time in milliseconds the highlighting should take.\n\n**returns** a Promise which is resolved when the highlight ends. The resolved value is __true__ if the animation ends without interruption; __false__ if _stop_ was called.\n\n### stop()\n\nStops highlighting if it's in progress. \n\n### clear()\n\nClears the highlighting.\n\n## Examples\n\nSee it live in action on [lumin.rocks](https://lumin.rocks/) or view sample code in the [Examples folder](https://github.com/pshihn/lumin/tree/master/examples).\n\n\n## License\n[MIT License](https://github.com/pshihn/lumin/blob/master/LICENSE) (c) [Preet Shihn](https://twitter.com/preetster)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpshihn%2Flumin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpshihn%2Flumin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpshihn%2Flumin/lists"}