Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs Component #25

Open
ergenekonyigit opened this issue Nov 14, 2022 · 1 comment
Open

Tabs Component #25

ergenekonyigit opened this issue Nov 14, 2022 · 1 comment
Labels
adr Component Adr ready-for-dev Ready for development tabs Tabs component

Comments

@ergenekonyigit
Copy link
Member

ergenekonyigit commented Nov 14, 2022

Design

Figma Design Document

Implementation

General usage example:

  const [value, setValue] = useState("tab1");
  //...
  <Tabs value={value} onValueChange={setValue}>
    <Tabs.List>
      <Tabs.Option value="tab1" title="tab 1" caption="" badge={<Badge variant="" />} icon="" disabled>
      <Tabs.Option value="tab2" title="tab 2"  caption="" badge={<Badge variant="" />} icon="">
    </Tabs.List>
    <Tabs.Content value="tab1"><ContentView /></Tabs.Content>
    <Tabs.Content value="tab2"><ContentView /></Tabs.Content>
  </Tabs>

Rules

  • A tab should contain a title and may contain caption, icon and badge.
  • There should be a border between tabs. Don’t use border on the last tabs end.
  • Tab title and caption texts are limited to one line.
  • The default view is that one tab is preselected and is usually the first tab. Only one tab can be selected at a time. When a user chooses a new item, the previous tab is automatically deselected.
  • Should respect to contribution guideline

API Reference:

Tabs component

Tabs are used to organize related content. They allow the user to navigate between groups of information that appear within the same context.

Tabs Properties

Property Description Default Value
value (string) The value of the Tab -
onValueChange (function) The onValueChange function of the Tab -
defaultValue (string) The defaultValue of the Tab -

Tabs.Option Properties

Property Description Default Value
value (string) The value of the Tab -
title (string) The title of the Tab -
caption (string) The caption of the Tab -
icon (string) The icon of the Tab -
badge (Badge) The badge of the Tab -
disabled (boolean) The disabled state of the Tab false
visible (boolean) The visible state of the Tab true
@buseselvi
Copy link

Here is the design documentation link. 🚀

@buseselvi buseselvi moved this from In Design to ADR in Baklava Design System React Native Jun 5, 2023
@gokselpirnal gokselpirnal added adr-required Not ready for development tabs Tabs component and removed baklava-ds labels Jun 20, 2023
@pinarkizilarslan pinarkizilarslan added ready-for-dev Ready for development and removed adr-required Not ready for development labels Jul 6, 2023
@pinarkizilarslan pinarkizilarslan moved this from ADR to Ready For Development in Baklava Design System React Native Jul 6, 2023
@ergenekonyigit ergenekonyigit added the adr Component Adr label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adr Component Adr ready-for-dev Ready for development tabs Tabs component
Projects
Status: Selected
Status: Ready For Development
Development

No branches or pull requests

4 participants