
Product
Socket Now Protects the Microsoft Edge Extension Ecosystem
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.
@strata-packages/offcanvas
Advanced tools
Lightweight offcanvas drawer component. Works standalone or with Strata CSS.
Lightweight offcanvas drawer component. Works standalone (no dependencies) or integrated with Strata CSS.
# Standalone
npm install @strata-packages/offcanvas
# With Strata (already included in strata.components.js — do not install separately)
npm install strata-css
<link rel="stylesheet" href="node_modules/@strata-packages/offcanvas/offcanvas.css">
<script src="node_modules/@strata-packages/offcanvas/offcanvas.js"></script>
<script src="node_modules/strata-css/dist/strata.components.js"></script>
Available as Strata.Offcanvas.open() / Strata.Offcanvas.close().
Two attributes drive everything — JS never touches classes:
| Attribute | Purpose | Values |
|---|---|---|
data-st-side | Slide direction — set once in HTML, CSS-driven | left / right / top / bottom |
aria-hidden | Open/close state — JS only updates the value | "true" / "false" |
<!-- Trigger -->
<button data-st-toggle="offcanvas" data-st-target="#myDrawer">Open</button>
<!-- Drawer (slides from the right) -->
<div id="myDrawer" class="offcanvas" data-st-side="right" aria-hidden="true" aria-modal="false">
<div class="offcanvas-header">
<h5 class="offcanvas-title">Title</h5>
<button data-st-dismiss="offcanvas">×</button>
</div>
<div class="offcanvas-body">
Content here.
</div>
</div>
Set data-st-side on the .offcanvas element — CSS handles the rest:
data-st-side | Slides in from |
|---|---|
left | Left |
right | Right |
top | Top |
bottom | Bottom |
// Standalone
StrataOffcanvas.open('#myDrawer')
StrataOffcanvas.close()
// With Strata
Strata.Offcanvas.open('#myDrawer')
Strata.Offcanvas.close()
// Pass element directly
Strata.Offcanvas.open(document.getElementById('myDrawer'))
Prevents closing on backdrop click:
<div class="offcanvas" data-st-side="right" data-st-backdrop="static" aria-hidden="true" aria-modal="false">
document.addEventListener('st:offcanvas:open', function (e) {
console.log('opened:', e.detail.offcanvas)
})
document.addEventListener('st:offcanvas:close', function (e) {
console.log('closed:', e.detail.offcanvas)
})
Set data-st-side before calling open() — JS never touches it, so it is always safe to change:
const drawer = document.getElementById('myDrawer')
drawer.setAttribute('data-st-side', 'left')
Strata.Offcanvas.open(drawer)
FAQs
Lightweight offcanvas drawer component. Works standalone or with Strata CSS.
The npm package @strata-packages/offcanvas receives a total of 1 weekly downloads. As such, @strata-packages/offcanvas popularity was classified as not popular.
We found that @strata-packages/offcanvas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.

Research
/Security News
Socket researchers found 18 Chrome extensions and one Edge extension delivering a wallet drainer, credential theft, and other malicious payloads.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.