{"id":23053536,"url":"https://github.com/component/confirmation","last_synced_at":"2025-08-15T03:33:03.413Z","repository":{"id":4172971,"uuid":"5289007","full_name":"component/confirmation","owner":"component","description":"Confirmation component built on Dialog","archived":false,"fork":false,"pushed_at":"2014-04-03T22:23:22.000Z","size":216,"stargazers_count":9,"open_issues_count":0,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-08T17:16:37.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-03T18:41:10.000Z","updated_at":"2018-01-29T07:57:31.000Z","dependencies_parsed_at":"2022-09-09T05:31:30.487Z","dependency_job_id":null,"html_url":"https://github.com/component/confirmation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fconfirmation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fconfirmation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fconfirmation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fconfirmation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/confirmation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229890528,"owners_count":18140110,"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":[],"created_at":"2024-12-16T00:18:34.303Z","updated_at":"2024-12-16T00:18:34.928Z","avatar_url":"https://github.com/component.png","language":"JavaScript","readme":"\n# Confirmation\n\n  Confirmation component with structural styling to give you a clean slate. Built on\n  the [Dialog](http://github.com/component/dialog) component.\n\n  ![js confirmation component](http://f.cl.ly/items/142j0B0d1E2K3z0r3h0i/Screen%20Shot%202012-08-03%20at%2011.37.49%20AM.png)\n  ![confirm](http://f.cl.ly/items/0o0z3T2R0o1v3S1E3d2W/Screen%20Shot%202012-08-03%20at%2011.37.57%20AM.png)\n\n  Live demo is [here](http://component.github.io/confirmation/)\n\n## Installation\n\n```\n$ npm install confirmation-component\n```\n\n## Features\n\n  - events for composition\n  - structural CSS letting you decide on style\n  - overlay, modal, escapable etc from Dialog\n  - fluent API\n\n## Events\n\n  - `show` the confirmation is shown\n  - `hide` the confirmation is hidden\n  - `cancel` the user closed the confirmation or cancelled\n  - `ok` the user accepted\n\n## API\n  \n### confirm(msg)\n\n  Display a confirmation dialog with a `msg` only.\n\n### confirm(title, msg)\n\n  Display a confirmation dialog with `title` and `msg`.\n\n### Confirmation#focus(type)\n\n  By default the \"cancel\" button is focused, however you\n  may invoke `.focus('ok')`.\n\n### Confirmation#cancel(text)\n\n  Set cancel button `text`.\n\n### Confirmation#ok(text)\n\n  Set cancel ok `text`.\n\n### Confirmation#show([fn])\n\n  Show the confirmation and invoke `fn` with\n  a boolean representing the user's choice.\n\n  View the [Dialog](http://github.com/component/dialog) API for\n  additional methods such as `.modal()`, `.closable()` etc.\n\n## License\n\n  MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fconfirmation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fconfirmation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fconfirmation/lists"}