{"id":17344381,"url":"https://github.com/ivteplo/html-sheet-element","last_synced_at":"2025-04-05T04:09:24.765Z","repository":{"id":60577102,"uuid":"492502609","full_name":"ivteplo/html-sheet-element","owner":"ivteplo","description":"HTML Custom Element for Creating Sheets","archived":false,"fork":false,"pushed_at":"2025-03-01T20:42:06.000Z","size":176,"stargazers_count":95,"open_issues_count":2,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T03:06:38.386Z","etag":null,"topics":["bottom-sheet","components","css","html","html-custom-elements","javascript","pure-javascript","sheet","ui-components","web-components","web-components-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivteplo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-15T13:57:23.000Z","updated_at":"2025-03-01T20:42:08.000Z","dependencies_parsed_at":"2024-06-28T17:28:51.011Z","dependency_job_id":"bff4dd86-8756-461c-984e-f2b198bbcb34","html_url":"https://github.com/ivteplo/html-sheet-element","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivteplo%2Fhtml-sheet-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivteplo%2Fhtml-sheet-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivteplo%2Fhtml-sheet-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivteplo%2Fhtml-sheet-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivteplo","download_url":"https://codeload.github.com/ivteplo/html-sheet-element/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284949,"owners_count":20913704,"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":["bottom-sheet","components","css","html","html-custom-elements","javascript","pure-javascript","sheet","ui-components","web-components","web-components-api"],"created_at":"2024-10-15T16:25:06.607Z","updated_at":"2025-04-05T04:09:24.745Z","avatar_url":"https://github.com/ivteplo.png","language":"JavaScript","readme":"# HTML Sheet Element\n\nHTML Custom Element for creating sheets. Displayed as a bottom sheet on mobile and a centered sheet on desktop.\n\n\n## Features\n\n- There is a handle at the top of the sheet that can be used to open or close the sheet\n- The sheet can be closed using a button in the sheet header, using the `Esc` key, or by clicking outside the bottom sheet\n    - This behavior is configurable. You can turn off the `Esc` or the click outside the sheet when you want.\n- API is similar to the `\u003cdialog\u003e` element's\n    - Supports forms inside of it\n    - Uses familiar method names and the same event names\n- There are many customization options\n\n\n## Installation\n\nYou can install this library from the npm registry:\n\n```bash\nnpm install @ivteplo/html-sheet-element\n```\n\nOr you can import it dynamically from a CDN:\n\n```javascript\nconst { SheetElement } = await import(\"https://unpkg.com/@ivteplo/html-sheet-element@1.0.0/build/index.js\")\n```\n\n\n## Usage\n\nBefore being able to use the element in your HTML, you need to specify a tag name for it using JavaScript:\n\n```javascript\nimport { SheetElement } from \"@ivteplo/html-sheet-element\"\n\n// You can choose another tag name instead of `ui-sheet`\nSheetElement.defineAs(\"ui-sheet\")\n```\n\nThen you can use the tag in your HTML:\n\n```html\n\u003cui-sheet id=\"sheet\"\u003e\n  \u003cp\u003eHello World!\u003c/p\u003e\n\u003c/ui-sheet\u003e\n```\n\nTo open a sheet, call the element's `showModal` method:\n\n```javascript\nconst sheet = document.querySelector(\"ui-sheet\")\nsheet.showModal()\n```\n\n\n## API Documentation\n\nYou can find API documentation [here](./documentation/API.md).\n\n\n## Development\n\n### Prerequisites\n\nYou need to have Git, Node.js, Deno, and any browser installed.\n\n### Setup\n\n1. Open your terminal\n\n2. Clone this repository\n    ```bash\n    git clone https://github.com/ivteplo/html-sheet-element/\n    ```\n\n3. Navigate into the cloned directory\n    ```bash\n    cd html-sheet-element\n    ```\n\n4. Install dependencies\n    ```bash\n    npm install\n    ```\n\n5. Start the development server\n    ```bash\n    npm run dev\n    ```\n\n6. Build the library\n    ```bash\n    npm run build\n    ```\n\n7. Build the API documentation\n    ```bash\n    npm run docs:api\n    ```\n\n8. Happy hacking :tada:\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivteplo%2Fhtml-sheet-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivteplo%2Fhtml-sheet-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivteplo%2Fhtml-sheet-element/lists"}