0.5.2 • Published 2 years ago

sito-mui-tab-view v0.5.2

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

Sito MUI TabView

Tabs make it easy to explore and switch between different views.

How to use it?

import SitoMUITabView from "sito-mui-tab-view";

function App() {
    return {
        <SitoMUITabView
            tabs={["Hola", "Adiós"]}
            content={[<div>Hola</div>, <div>Adiós</div>]}
        />
    }
}

You can change the name of the tab view, if you don't like its name 😂

import SitoMUITabView as TabView from "sito-mui-tab-view";

function App() {
    return {
        <TabView
            tabs={["Hola", "Adiós"]}
            content={[<div>Hola</div>, <div>Adiós</div>]}
        />
    }
}

You can add your css rules, like sx prop for styled-component, style prop like inline css styles and classNames from your css files

import SitoMUITabView from "sito-mui-tab-view";

function App() {
    return {
        <SitoMUITabView
            sx={{ width: "350px", height: "350px" }}
            tabs={["Hola", "Adiós"]}
            content={[<div>Hola</div>, <div>Adiós</div>]}
        />
    }
}

Props

NameTypeDefaultDescription
idstringhtml identifier
namestringhtml name
classNamestringcss class name
colorstring"primary"color for the indicator and text of the tabs
tabsAtTopbooleantrueshow tabs row at top
tabsAtBottombooleanfalseshow tabs row at bottom
contentArray[]array of node children
tabsArray[]array of labels of tabs
valuenumbercurrent tab
onChangefunc (event, newTab)tab event handler when change the current tab
sxArray<func| object| bool>| func| objectThe system prop that allows defining system overrides as well as additional CSS styles.
tabsContainerSxArray<func| object| bool>| func| objectThe system prop that allows defining system overrides as well as additional CSS styles for tabs row.
tabsSxArray<func| object| bool>| func| objectThe system prop that allows defining system overrides as well as additional CSS styles for each tab.
contentSxArray<func| object| bool>| func| objectThe system prop that allows defining system overrides as well as additional CSS styles for each content.
styleArray<func| object| bool>| func| objectinline css

🙌 Good luck out there my friend 🙌