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

bee-tabs

Package Overview
Dependencies
Maintainers
18
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-tabs

tabs ui component for react

  • 3.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
18
Created
Source

bee-tabs

npm version Build StatusdevDependency Status

react bee-tabs component for tinper-bee

使用方法

<Tabs navtype="turn" contenttype="moveleft" defaultActiveKey="2">
	<TabPanel tab="Tab 1" key="1">测试测试 1</TabPanel>
	<TabPanel tab="Tab 2" key="2">Content of Tab Pane 2</TabPanel>
	<TabPanel tab="Tab 3" key="3">测试测试 3</TabPanel>
	<TabPanel tab="Tab 4" key="4">Content of Tab Pane 4</TabPanel>
</Tabs>

API

Tabs

props:
nametypedefaultdescription
activeKeyStringcurrent active tabPanel's key
tabBarPositionStringtab nav 's position. one of ['left','right','top','bottom']
defaultActiveKeyStringfirst active tabPanel's keyinitial active tabPanel's key if activeKey is absent
renderTabBar():React.NodeHow to render tab bar
renderTabContent():React.NodeHow to render tab content
onChange(key: string): voidcalled when tabPanel is changed
destroyInactiveTabPaneBooleanfalsewhether destroy inactive tabpane when change tab
prefixClsStringrc-tabsprefix class name, use to custom style

TabPane

props:
nametypedefaultdescription
keyObjectcorresponding to activeKey
styleObject
placeholderReact.Nodelazyrender children
tabReact.Nodecurrent tab's title corresponding to current tabPane

src/TabBar

nametypedefaultdescription
onTabClick(key: string): voidcallback when tab clicked
stylebar style
extraContentReact Nodeextra content placed one the right of tab bar

src/InkTabBar

tab bar with ink indicator, in addition to tab bar props, extra props:

nametypedefaultdescription
styles{ inkBar }can set inkBar style

src/ScrollableTabBar

scrollable tab bar, in addition to tab bar props, extra props:

nametypedefaultdescription
onPrevClick(e: Event): voidcallback when prev button is clicked
onNextClick(e: Event): voidcallback when next button is clicked

src/ScrollableInkTabBar

scrollable tab bar with ink indicator, same with tab bar and ink bar and scrollable bar props.

src/SwipeableInkTabBar (Use for Mobile)

swipeable tab bar with ink indicator, same with tab bar/ink bar props, and below is the additional props.

nametypedefaultdescription
pageSizenumber5show how many tabs at one page
speednumber5swipe speed, 1 to 10, more bigger more faster
hammerOptionsObjectoptions for react-hammerjs

src/TabContent

nametypedefaultdescription
styleObjecttab content style
animatedBooleantruewhether tabpane change with animation
animatedWithMarginBooleanfalsewhether animate tabpane with css margin
forceRenderBooleanfalseforced render of content in tabs, not lazy render after clicking on tabs

src/SwipeableTabContent

swipeable tab panes, in addition to lib/TabContent props, extra props:

nametypedefaultdescription
hammerOptionsObjectoptions for react-hammerjs
开发调试
$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-tabs
$ cd bee-tabs
$ npm install
$ npm run dev

TODOS

  • [css样式层级问题]
  • [动态计算样式]
  • [autoprefix] 产出工具集成
  • [测试用例]

Keywords

FAQs

Package last updated on 21 Oct 2021

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