npm.io
1.4.0-alpha.0 • Published 4 years ago

react-lean-tab

Licence
MIT
Version
1.4.0-alpha.0
Deps
14
Size
19 kB
Vulns
0
Weekly
0

Tabs

Tabs

API Props

Syntax Type Description
active number Title
onActiveChange func Text
disabled boolean If true, the component is disabled.
initialValue number You can provide your own value. Otherwise, we fallback to the child position index.

Usage

<Tab>
	<Tab.Pane title="First Pane">First Pane Body</Tab.Pane>

	<Tab.Pane title="Second Pane">Second Pane Body</Tab.Pane>
</Tab>
Uncontrolled
<Tab initialActive={0}>
  <Tab.Pane title="A">...</Tab.Pane>
  <Tab.Pane title="B">...</Tab.Pane>
</Tab>
Controlled
<Tab active={active} onActiveChange={onActiveChange}>
  <Tab.Pane title="A">...</Tab.Pane>
  <Tab.Pane title="B">...</Tab.Pane>
</Tab>