4.3.2 • Published 5 months ago

@hawk-ui/tabbed v4.3.2

Weekly downloads
589
License
MIT
Repository
-
Last release
5 months ago

Installation

To install a component run

$ npm install @hawk-ui/tabbed --save

Please import CSS styles via

@import '/path__to__node_modules/@hawk-ui/tabbed/dist/index.min.css

Usage

Horizontal Top Tabs

Demo

import Tabbed from '@hawk-ui/tabbed';
const headers = ['First', 'Second', 'Third'];
const panes = [
  <div style={{ margin: '20px 50px' }}>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</div>,
  <div style={{ margin: '20px 50px' }}>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going.</div>,
  <div style={{ margin: '20px 50px' }}>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</div>
];

initialState = {
  activeTabIndex: 0,
};

<Tabbed
  headers={headers}
  panes={panes}
  activeTabIndex={state.activeTabIndex}
  onActiveTabChange={(event) => {
    setState({ activeTabIndex: event });
  }}
/>

Horizontal Bottom Tabs

Demo

import Tabbed from '@hawk-ui/tabbed';
const headers = ['First', 'Second', 'Third'];
const panes = [
  <div style={{ margin: '20px 50px' }}>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</div>,
  <div style={{ margin: '20px 50px' }}>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going.</div>,
  <div style={{ margin: '20px 50px' }}>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</div>
];

initialState = {
  activeTabIndex: 0,
};

<Tabbed
  headers={headers}
  panes={panes}
  layout="horizontalBottom"
  activeTabIndex={state.activeTabIndex}
  onActiveTabChange={(event) => {
    setState({ activeTabIndex: event });
  }}
/>

Vertical Left Tabs

Demo

import Tabbed from '@hawk-ui/tabbed';
const headers = ['First', 'Second', 'Third'];
const panes = [
  <div style={{ margin: '20px 50px' }}>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</div>,
  <div style={{ margin: '20px 50px' }}>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going.</div>,
  <div style={{ margin: '20px 50px' }}>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</div>
];

initialState = {
  activeTabIndex: 0,
};

<Tabbed
  headers={headers}
  panes={panes}
  layout="verticalLeft"
  activeTabIndex={state.activeTabIndex}
  onActiveTabChange={(event) => {
    setState({ activeTabIndex: event });
  }}
/>

Vertical Right Tabs

Demo

import Tabbed from '@hawk-ui/tabbed';
const headers = ['First', 'Second', 'Third'];
const panes = [
  <div style={{ margin: '20px 50px' }}>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</div>,
  <div style={{ margin: '20px 50px' }}>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going.</div>,
  <div style={{ margin: '20px 50px' }}>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</div>
];

initialState = {
  activeTabIndex: 0,
};

<Tabbed
  headers={headers}
  panes={panes}
  layout="verticalRight"
  activeTabIndex={state.activeTabIndex}
  onActiveTabChange={(event) => {
    setState({ activeTabIndex: event });
  }}
/>

Header and Panes are Separate

Demo

import Tabbed from '@hawk-ui/tabbed';
const headers = ['First', 'Second', 'Third'];
const panes = [
  <div style={{ margin: '20px 50px' }}>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make</div>,
  <div style={{ margin: '20px 50px' }}>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going.</div>,
  <div style={{ margin: '20px 50px' }}>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</div>
];

initialState = {
  activeTabIndex: 0,
};

<div>
  <Tabbed
    headers={headers}
    activeTabIndex={state.activeTabIndex}
    onActiveTabChange={(event) => {
      setState({ activeTabIndex: event });
    }}
  />

  <Tabbed
    panes={panes}
    activeTabIndex={state.activeTabIndex}
  />
</div>
4.1.8

7 months ago

4.1.7

9 months ago

4.1.9

7 months ago

4.3.2

5 months ago

4.3.1

5 months ago

4.3.0

5 months ago

4.2.3

7 months ago

4.2.2

7 months ago

4.2.5

6 months ago

4.2.4

6 months ago

4.2.1

7 months ago

4.2.0

7 months ago

4.2.7

6 months ago

4.2.6

6 months ago

4.2.9

5 months ago

4.2.8

6 months ago

4.1.6

11 months ago

4.1.5

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.0.9

2 years ago

4.0.8

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.3

2 years ago

4.0.1

2 years ago

4.0.2

2 years ago

4.0.0

2 years ago

3.1.7

2 years ago

3.1.9

2 years ago

3.1.8

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.1.3

3 years ago

3.1.2

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.9

3 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.13.2

3 years ago

2.13.0

3 years ago

2.13.1

3 years ago

2.12.9

3 years ago

2.12.7

3 years ago

2.12.8

3 years ago

2.12.10

3 years ago

2.12.5

3 years ago

2.12.6

3 years ago

2.12.4

3 years ago

2.12.3

3 years ago

2.12.2

3 years ago

2.12.1

3 years ago

2.11.9

3 years ago

2.11.8

3 years ago

2.11.7

3 years ago

2.11.6

3 years ago

2.11.5

3 years ago

2.11.4

3 years ago

2.11.3

3 years ago

2.11.2

3 years ago

2.11.0

3 years ago

2.11.1

3 years ago

2.10.9

3 years ago

2.10.7

3 years ago

2.10.8

3 years ago

2.10.5

3 years ago

2.10.6

3 years ago

2.10.1

3 years ago

2.10.0

3 years ago

2.9.9

3 years ago

2.9.6

4 years ago

2.9.5

4 years ago

2.9.8

4 years ago

2.9.4

4 years ago

2.9.3

4 years ago

2.9.2

4 years ago

2.9.1

4 years ago

2.9.0

4 years ago

2.8.9

4 years ago

2.8.8

4 years ago

2.8.7

4 years ago

2.8.6

4 years ago

2.8.5

4 years ago

2.8.4

4 years ago

2.8.3

4 years ago

2.8.2

4 years ago

2.8.1

4 years ago

2.8.0

4 years ago

2.7.9

4 years ago

2.7.6

4 years ago

2.7.8

4 years ago

2.7.7

4 years ago

2.7.4

4 years ago

2.7.5

4 years ago

2.7.3

4 years ago

2.7.2

4 years ago

2.7.1

4 years ago

2.6.8

4 years ago

2.6.7

4 years ago

2.6.6

4 years ago

2.6.5

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.6.3

4 years ago

2.6.2

4 years ago

2.6.4

4 years ago

2.5.9

4 years ago

2.5.8

4 years ago

2.5.7

4 years ago

2.5.6

4 years ago

2.5.5

4 years ago

2.5.4

4 years ago

2.5.0

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.3

4 years ago

2.4.9

4 years ago

2.4.8

4 years ago

2.4.7

4 years ago

2.4.6

4 years ago

2.4.5

4 years ago

2.4.4

4 years ago

2.4.3

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.4.2

4 years ago

2.3.8

4 years ago

2.3.9

4 years ago

2.3.7

4 years ago

2.3.6

4 years ago

2.3.5

4 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.9

4 years ago

2.2.8

4 years ago

2.2.7

4 years ago

2.2.6

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.2

4 years ago

2.1.3

4 years ago

2.1.1

4 years ago

2.0.9

4 years ago

2.1.0

4 years ago

2.0.7

4 years ago

2.0.8

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.9.10

4 years ago

1.9.9

4 years ago

1.9.8

4 years ago

1.9.7

4 years ago

1.9.6

4 years ago

1.9.5

4 years ago

1.9.4

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.9

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.8.8

4 years ago

1.8.7

4 years ago

1.8.6

4 years ago

1.8.5

4 years ago

1.8.4

4 years ago

1.8.3

4 years ago

1.8.2

4 years ago

1.7.9

4 years ago

1.7.8

4 years ago

1.7.7

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.4

4 years ago