{"id":49391350,"url":"https://github.com/mironovsergey/bootstrap-sheet","last_synced_at":"2026-04-28T12:35:05.388Z","repository":{"id":319884600,"uuid":"1060864742","full_name":"mironovsergey/bootstrap-sheet","owner":"mironovsergey","description":"A touch-friendly bottom sheet component for Bootstrap 5","archived":false,"fork":false,"pushed_at":"2026-04-20T09:05:39.000Z","size":704,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T11:14:46.741Z","etag":null,"topics":["a11y","accessibility","action-sheet","bootstrap","bootstrap5","bottom-sheet","css","drawer","gestures","javascript","mobile","modal","responsive","sass","scss","touch","ui-component"],"latest_commit_sha":null,"homepage":"https://mironovsergey.github.io/bootstrap-sheet/","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/mironovsergey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T18:46:00.000Z","updated_at":"2026-04-20T09:05:42.000Z","dependencies_parsed_at":"2025-10-20T19:11:47.900Z","dependency_job_id":"1783d4fc-f3da-4a7c-a500-4a234d4248c7","html_url":"https://github.com/mironovsergey/bootstrap-sheet","commit_stats":null,"previous_names":["mironovsergey/bootstrap-sheet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mironovsergey/bootstrap-sheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mironovsergey%2Fbootstrap-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mironovsergey%2Fbootstrap-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mironovsergey%2Fbootstrap-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mironovsergey%2Fbootstrap-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mironovsergey","download_url":"https://codeload.github.com/mironovsergey/bootstrap-sheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mironovsergey%2Fbootstrap-sheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32381686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["a11y","accessibility","action-sheet","bootstrap","bootstrap5","bottom-sheet","css","drawer","gestures","javascript","mobile","modal","responsive","sass","scss","touch","ui-component"],"created_at":"2026-04-28T12:35:03.341Z","updated_at":"2026-04-28T12:35:05.379Z","avatar_url":"https://github.com/mironovsergey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootstrap Sheet\n\n[![npm version](https://img.shields.io/npm/v/bootstrap-sheet)](https://www.npmjs.com/package/bootstrap-sheet)\n[![npm downloads](https://img.shields.io/npm/dm/bootstrap-sheet)](https://www.npmjs.com/package/bootstrap-sheet)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/bootstrap-sheet)](https://bundlephobia.com/package/bootstrap-sheet)\n[![License](https://img.shields.io/github/license/mironovsergey/bootstrap-sheet)](https://github.com/mironovsergey/bootstrap-sheet/blob/main/LICENSE)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/mironovsergey/bootstrap-sheet/test.yml?branch=main)](https://github.com/mironovsergey/bootstrap-sheet/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/mironovsergey/bootstrap-sheet/branch/main/graph/badge.svg)](https://codecov.io/gh/mironovsergey/bootstrap-sheet)\n[![Known Vulnerabilities](https://snyk.io/test/github/mironovsergey/bootstrap-sheet/badge.svg)](https://snyk.io/test/github/mironovsergey/bootstrap-sheet)\n[![Demo](https://img.shields.io/badge/demo-live-success)](https://mironovsergey.github.io/bootstrap-sheet/)\n\nTouch-friendly bottom sheet component for Bootstrap 5 — supports swipe gestures, backdrop, focus management, and is built with accessibility in mind.\n\n[Documentation](https://mironovsergey.github.io/bootstrap-sheet/) · [Report Bug](https://github.com/mironovsergey/bootstrap-sheet/issues) · [Request Feature](https://github.com/mironovsergey/bootstrap-sheet/issues) · [Discussions](https://github.com/mironovsergey/bootstrap-sheet/discussions)\n\n---\n\n## Table of contents\n\n- [Bootstrap Sheet](#bootstrap-sheet)\n  - [Table of contents](#table-of-contents)\n  - [Installation](#installation)\n    - [NPM](#npm)\n    - [Yarn](#yarn)\n    - [CDN](#cdn)\n      - [jsDelivr](#jsdelivr)\n      - [unpkg](#unpkg)\n    - [Download](#download)\n  - [Quick Start](#quick-start)\n    - [Via data attributes](#via-data-attributes)\n    - [Via JavaScript](#via-javascript)\n  - [Options](#options)\n    - [UI Options](#ui-options)\n    - [Gesture Options](#gesture-options)\n    - [Animation Options](#animation-options)\n  - [Methods](#methods)\n  - [Properties](#properties)\n  - [Events](#events)\n  - [Sass variables](#sass-variables)\n  - [Accessibility](#accessibility)\n  - [Contributing](#contributing)\n  - [Versioning](#versioning)\n  - [License](#license)\n  - [Author](#author)\n\n---\n\n## Installation\n\n### NPM\n\n```bash\nnpm install bootstrap-sheet\n```\n\n### Yarn\n\n```bash\nyarn add bootstrap-sheet\n```\n\n### CDN\n\n#### jsDelivr\n\n```html\n\u003c!-- CSS --\u003e\n\u003clink\n  href=\"https://cdn.jsdelivr.net/npm/bootstrap-sheet@latest/dist/css/bootstrap-sheet.min.css\"\n  rel=\"stylesheet\"\n/\u003e\n\n\u003c!-- JavaScript --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/bootstrap-sheet@latest/dist/js/bootstrap-sheet.min.js\"\u003e\u003c/script\u003e\n```\n\n#### unpkg\n\n```html\n\u003c!-- CSS --\u003e\n\u003clink\n  href=\"https://unpkg.com/bootstrap-sheet@latest/dist/css/bootstrap-sheet.min.css\"\n  rel=\"stylesheet\"\n/\u003e\n\n\u003c!-- JavaScript --\u003e\n\u003cscript src=\"https://unpkg.com/bootstrap-sheet@latest/dist/js/bootstrap-sheet.min.js\"\u003e\u003c/script\u003e\n```\n\n### Download\n\n[Download the latest release](https://github.com/mironovsergey/bootstrap-sheet/releases/latest) and include the compiled CSS and JavaScript files in your project.\n\n---\n\n## Quick Start\n\n### Via data attributes\n\nActivate a sheet without writing JavaScript. Set `data-bs-toggle=\"sheet\"` on a controller element, like a button, along with a `data-bs-target=\"#foo\"` or `href=\"#foo\"` to target a specific sheet to toggle.\n\n```html\n\u003c!-- Button trigger --\u003e\n\u003cbutton type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"sheet\" data-bs-target=\"#mySheet\"\u003e\n  Launch sheet\n\u003c/button\u003e\n\n\u003c!-- Sheet --\u003e\n\u003cdiv\n  class=\"sheet\"\n  id=\"mySheet\"\n  tabindex=\"-1\"\n  data-bs-backdrop=\"true\"\n  data-bs-keyboard=\"true\"\n  data-bs-focus=\"true\"\n\u003e\n  \u003cdiv class=\"sheet-handle\" data-bs-drag=\"sheet\"\u003e\u003c/div\u003e\n  \u003cdiv class=\"sheet-header\"\u003e\n    \u003ch5 class=\"sheet-title\"\u003eSheet title\u003c/h5\u003e\n    \u003cbutton type=\"button\" class=\"btn-close\" data-bs-dismiss=\"sheet\" aria-label=\"Close\"\u003e\u003c/button\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"sheet-body\"\u003e\n    \u003cp\u003eSheet body text goes here.\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"sheet-footer\"\u003e\n    \u003cbutton type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"sheet\"\u003eClose\u003c/button\u003e\n    \u003cbutton type=\"button\" class=\"btn btn-primary\"\u003eSave changes\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Via JavaScript\n\n```javascript\nimport BootstrapSheet from 'bootstrap-sheet';\n\n// Create instance (selector or Element accepted)\nconst sheet = new BootstrapSheet('#mySheet', {\n  backdrop: true,\n  keyboard: true,\n  focus: true,\n  gestures: true,\n});\n\n// Show the sheet\nsheet.show();\n```\n\n**More examples:** [Live Demo](https://mironovsergey.github.io/bootstrap-sheet/)\n\n---\n\n## Options\n\nOptions can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-backdrop=\"static\"`.\n\n### UI Options\n\n| Name       | Type                  | Default | Description                                                                                           |\n| ---------- | --------------------- | ------- | ----------------------------------------------------------------------------------------------------- |\n| `backdrop` | boolean or `'static'` | `true`  | Includes a backdrop element. Use `'static'` for a backdrop that doesn't close the sheet when clicked. |\n| `keyboard` | boolean               | `true`  | Closes the sheet when escape key is pressed.                                                          |\n| `focus`    | boolean               | `true`  | Puts focus on the sheet when initialized and traps focus within it.                                   |\n\n### Gesture Options\n\n| Name                  | Type    | Default | Description                                                 |\n| --------------------- | ------- | ------- | ----------------------------------------------------------- |\n| `gestures`            | boolean | `true`  | Enable/disable swipe gestures.                              |\n| `swipeThreshold`      | number  | `50`    | Minimum swipe distance (px) to trigger close.               |\n| `velocityThreshold`   | number  | `0.5`   | Minimum velocity (px/ms) to trigger close.                  |\n| `minCloseDistance`    | number  | `50`    | Minimum distance (px) for velocity-based close.             |\n| `closeThresholdRatio` | number  | `0.3`   | Ratio of sheet height (0-1) to trigger close when released. |\n\n### Animation Options\n\n| Name                 | Type   | Default | Description                                                    |\n| -------------------- | ------ | ------- | -------------------------------------------------------------- |\n| `animationDuration`  | number | `300`   | Animation duration in milliseconds.                            |\n| `projectionTime`     | number | `200`   | Time (ms) to project velocity for momentum-based closing.      |\n| `dragResistanceUp`   | number | `0.75`  | Resistance when dragging up (0-1, higher = more resistance).   |\n| `dragResistanceDown` | number | `0.01`  | Resistance when dragging down (0-1, higher = more resistance). |\n\n---\n\n## Methods\n\nAll methods are **asynchronous** and return to the caller as soon as the transition starts.\n\n```javascript\nconst sheet = BootstrapSheet.getInstance('#mySheet');\n```\n\n| Method                                           | Description                                                                            |\n| ------------------------------------------------ | -------------------------------------------------------------------------------------- |\n| `show()`                                         | Opens the sheet.                                                                       |\n| `hide()`                                         | Closes the sheet.                                                                      |\n| `toggle()`                                       | Toggles the sheet visibility.                                                          |\n| `dispose()`                                      | Destroys the sheet instance and removes all event listeners.                           |\n| `getInstance(element)` (static)                  | Returns the sheet instance associated with a DOM element or `null` if not initialized. |\n| `getOrCreateInstance(element, config?)` (static) | Gets existing instance or creates a new one if it doesn't exist.                       |\n\n---\n\n## Properties\n\n| Property          | Type    | Description                                         |\n| ----------------- | ------- | --------------------------------------------------- |\n| `isShown`         | boolean | Returns `true` if the sheet is currently visible.   |\n| `isTransitioning` | boolean | Returns `true` if the sheet is currently animating. |\n\n---\n\n## Events\n\nAll events are fired at the sheet element itself.\n\n| Event Type        | Description                                                                                                      |\n| ----------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `show.bs.sheet`   | Fired immediately when the `show()` method is called.                                                            |\n| `shown.bs.sheet`  | Fired when the sheet has been made visible to the user (after CSS transitions complete).                         |\n| `hide.bs.sheet`   | Fired immediately when the `hide()` method is called.                                                            |\n| `hidden.bs.sheet` | Fired when the sheet has finished being hidden from the user (after CSS transitions complete).                   |\n| `slide.bs.sheet`  | Fired continuously during drag/slide gestures. Event detail contains `velocity`, `adjustedY`, `deltaY`, `ratio`. |\n\n```javascript\ndocument.getElementById('mySheet').addEventListener('shown.bs.sheet', (event) =\u003e {\n  console.log('Sheet is now visible');\n});\n```\n\n---\n\n## Sass variables\n\nCustomize the appearance by overriding these Sass variables:\n\n```scss\n// Z-index\n$sheet-zindex: 1057 !default;\n\n// Dimensions\n$sheet-width: 100vw !default;\n$sheet-max-width: 100% !default;\n$sheet-max-height: 90vh !default;\n\n// Colors\n$sheet-bg: var(--bs-body-bg, #fff) !default;\n$sheet-backdrop-bg: rgba(0, 0, 0, 0.5) !default;\n$sheet-backdrop-backdrop-filter: blur(2px) !default;\n\n// Transitions\n$sheet-transition-duration: 0.3s !default;\n$sheet-transition-timing: ease-out !default;\n\n// Handle\n$sheet-handle-bg: var(--bs-gray-400, #dee2e6) !default;\n$sheet-handle-hover-bg: var(--bs-gray-500, #adb5bd) !default;\n$sheet-handle-width: 3rem !default;\n$sheet-handle-height: 0.25rem !default;\n$sheet-handle-margin: 0.5rem auto !default;\n$sheet-handle-hit-area: 2rem !default;\n\n// Spacing\n$sheet-padding-x: 1rem !default;\n$sheet-padding-y: 1rem !default;\n$sheet-header-padding-y: 0.75rem !default;\n$sheet-body-padding-y: 1rem !default;\n$sheet-footer-padding-y: 0.75rem !default;\n\n// Visual effects\n$sheet-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !default;\n$sheet-border-width: 1px !default;\n$sheet-border-color: var(--bs-border-color, #dee2e6) !default;\n$sheet-border-radius: 1rem 1rem 0 0 !default;\n\n// Focus\n$sheet-focus-ring-width: 0.25rem !default;\n$sheet-focus-ring-color: rgba(13, 110, 253, 0.25) !default;\n\n// Animations\n$sheet-shake-distance: 10px !default;\n\n// States\n$sheet-disabled-opacity: 0.65 !default;\n```\n\n---\n\n## Accessibility\n\nBootstrap Sheet follows WCAG 2.1 Level AA guidelines:\n\n- **ARIA attributes** — Automatically applies `role=\"dialog\"` and `aria-modal=\"true\"`\n- **Focus management** — Traps focus within the sheet and restores it on close\n- **Keyboard navigation** — Full support for Tab, Shift+Tab, and Escape keys\n- **Inert background** — Uses native `inert` attribute with `aria-hidden` fallback\n- **Screen reader support** — Announces state changes with proper context\n- **Reduced motion** — Respects `prefers-reduced-motion` user preference\n\n---\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guidelines](https://github.com/mironovsergey/bootstrap-sheet/blob/main/CONTRIBUTING.md) before submitting a Pull Request.\n\n---\n\n## Versioning\n\nBootstrap Sheet follows [Semantic Versioning](https://semver.org/). For available versions, see [Releases](https://github.com/mironovsergey/bootstrap-sheet/releases).\n\n---\n\n## License\n\nCode and documentation © 2025 [Sergey Mironov](https://github.com/mironovsergey)\n\nCode released under the [MIT License](https://github.com/mironovsergey/bootstrap-sheet/blob/main/LICENSE)\n\nDocumentation released under [Creative Commons Attribution 3.0](https://creativecommons.org/licenses/by/3.0/)\n\n---\n\n## Author\n\n**Sergey Mironov**\n\n- GitHub: [@mironovsergey](https://github.com/mironovsergey)\n- Email: sergeymironov@protonmail.com\n\n---\n\n**[⬆ Back to top](#bootstrap-sheet)**\n\nMade with ❤️ by [Sergey Mironov](https://github.com/mironovsergey)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmironovsergey%2Fbootstrap-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmironovsergey%2Fbootstrap-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmironovsergey%2Fbootstrap-sheet/lists"}