Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coffeekraken/s-refocus-feature

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coffeekraken/s-refocus-feature

  • 2.0.0-alpha.5
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

{{#> layout-readme }}

Simply refocus elements inside a scrollable one.

This SRefocusFeature feature allows you to simple visually refocus an element inside a scrollable one. Here's some of the features available:

  • Declarative API like <div s-refocus on="eventName">...</div>
  • Fully customizable scroll behavior
  • Specify triggerers like:
    • anchor: Scroll to the element that correspond to the anchor in url
    • history: Listen for change in history and scroll to element if needed
    • event:eventName: Specify an event to listen to. When an element dispatch this element, scroll to it

Usage

Here's how to use our implementation:

import { define } from '@coffeekraken/s-refocus-feature';
define({
    // default props
});

Consider the url http://localhost:my-anchor

<div class="my-scrollable-div" s-refocus trigger="anchor,history,event:actual">
    <ul>
        <!-- some list items... -->
        <li id="my-anchor">...</li>
        <!-- some list items... -->
    </ul>
</div>
Properties

{{> interface namespace='@coffeekraken.s-refocus-feature.js.interface.SRefocusFeatureInterface' }}

{{/ layout-readme }}

FAQs

Package last updated on 28 Jul 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc