
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
A macOS like dockbar component made with Web Components
that can be used in any framework.
NPM
npm install dockbar --save
CDN
ESM(Example)
<head>
<script type="module" src="https://unpkg.com/dockbar@latest/dockbar.js"></script>
</head>
IIFE(Example)
<head>
<script src="https://unpkg.com/dockbar@latest/dockbar.iife.js"></script>
</head>
Go to Codepen for a quick try.
<body>
<dock-wrapper>
<dock-item>1</dock-item>
<dock-item>2</dock-item>
<dock-item>3</dock-item>
<dock-item>4</dock-item>
</dock-wrapper>
</body>
It is recommended to use a custom element inside dock-item
, so that you can customize the content of dock-item
.
<dock-wrapper>
<dock-item>
<div class="my-element"></div>
</dock-item>
</dock-wrapper>
You may need to look at docs if you are using a framework like Vue.js or React.
Apply class
to dock-wrapper
and dock-item
and customize your own style.
For more, see Configuration.
There are some problems yet to be solved:
ClientOnly
, and import component asynchronously.iife
, it may cause a flash on init, because the style is loaded asynchronously. For now you could resolve this by applying a style:
<head>
#dock {
visibility: hidden;
}
#dock:defined {
visibility: visible;
}
</head>
<body>
<dock-wrapper id="dock">
</dock-wrapper>
</body>
Property | Type | Default | Description |
---|---|---|---|
size | number | 40 | The size of dock-item in px , see Sizes |
padding | number | 8 | The padding of dock-wrapper in px , see Sizes |
gap | number | 8 | The gap between dock-item in px , see Sizes |
maxScale | number | 2 | The max scale of dock-item , see Sizes |
maxRange | number | 200 | The max range of dock-item that will scale when mouseover in px , see Sizes |
disabled | boolean | false | Disable the scale effect |
direction | horizontal | vertical | horizontal | The direction of dock-item s |
position | top | bottom | left | right | bottom | The position of dock-wrapper , will affect the scale origin |
FAQs
A macOS-like dock made with Web-Components
We found that dockbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.