3.0.8 • Published 10 months ago

@uireact/tabs v3.0.8

Weekly downloads
-
License
GNU
Repository
-
Last release
10 months ago

@UiReact

UiReact icon

This is a React UI library, that defines a customizable theme object that powers all colorations, texts, sizes, etc.. Across your react application.

We are built using framer-motion for great animations and styled-components for easy CSS management.

You should visit our docs page for all information @uireact docs.

@uireact/tabs

This package exports UiTabs and UiTabsItem component which help to render tabs.

We have a page dedicated to this component @uireact/tabs docs.

Usage

Get @UiReact library working

First step is to get the library working for this you can look at this doc: Getting started.

Install package

If using npm:

npm i -S @uireact/tabs

Use it

export const TabsExample: React.FC = () => {
  const [selectedTab, setSelectedTab] = React.useState(1);

  const handleTabClick = React.useCallback(
    (identifier: number) => {
      setSelectedTab(identifier);
    },
    [setSelectedTab]
  );

  return (
    <UiCard noPadding>
      <UiTabs rounded>
        <UiTabItem<number> selected={selectedTab === 1} identifier={1} handleClick={handleTabClick}>
          <UiText>Fruits</UiText>
        </UiTabItem>
        <UiTabItem<number> selected={selectedTab === 2} identifier={2} handleClick={handleTabClick}>
          <UiText>Vegetables</UiText>
        </UiTabItem>
        <UiTabItem<number> selected={selectedTab === 3} identifier={3} handleClick={handleTabClick}>
          <UiText>Meats</UiText>
        </UiTabItem>
      </UiTabs>
      {selectedTab === 1 && <Fruits />}
      {selectedTab === 2 && <Veggies />}
      {selectedTab === 3 && <Meats />}
    </UiCard>
  );
};
3.0.8

10 months ago

3.0.7

10 months ago

3.0.6

10 months ago

3.0.4

11 months ago

3.0.5

11 months ago

2.5.3

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.3.0

1 year ago

2.5.0

1 year ago

2.4.0

1 year ago

2.2.0

1 year ago

2.1.4

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.1.4

2 years ago

1.0.5

2 years ago

1.2.2

2 years ago

1.1.3

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.1.1-alpha.15

2 years ago

0.1.1-alpha.13

2 years ago

0.1.0

2 years ago