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

bee-anchor

Package Overview
Dependencies
Maintainers
14
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-anchor

Anchor ui component for react

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-26.92%
Maintainers
14
Weekly downloads
 
Created
Source

bee-anchor

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react bee-anchor component for tinper-bee

基于 gumshoejs 的锚点组件

依赖

  • react >= 15.3.0
  • react-dom >= 15.3.0
  • prop-types >= 15.6.0

使用方法

import Anchor from 'bee-anchor';
import 'bee-anchor/build/Anchor.css';

API

参数说明类型默认值
selector目标元素选择器string-
offset向上偏移量,例如有固定header,则 offset=()=>return header.getBoundingClientRect().height()=>{}0
navClass当前被激活锚点新增的类名string'active'
contentClass当前被激活区域新增的类名string'active'
nested是否有嵌套导航boolfalse
nestedClass嵌套导航激活时父节点的类名string'active'
event是否添加监听事件booltrue
activeHandle被激活的回调,三个参数,以基本示例为例,列表li、锚点a、激活区域pfunc()=>{})
deactiveHandle激活后的回调func()=>{})
开发调试
$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-anchor
$ cd bee-anchor
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 24 Apr 2020

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