1.4.0-alpha.0 • Published 2 years ago

react-lean-tab v1.4.0-alpha.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Tabs

Tabs

API Props

SyntaxTypeDescription
activenumberTitle
onActiveChangefuncText
disabledbooleanIf true, the component is disabled.
initialValuenumberYou 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>