# Tabs

# Most common usage scenario

NOT YET DOCUMENTED

This section is not fully documented yet. We are doing our best to make our documentation a good and complete source of knowledge about Storefront UI. If you would like to help us, please don't hesitate to contribute to our docs. You can read more about it here.

# Props

  • openTab
    • Which tab should be open at the beginning
    • type: number

# Slots

  • default
    • Default. Here you should pass your tabs

# Events

None.

# CSS modifiers

  • .sf-tabs__title--active

# SCSS variables

$tabs-border-color: $c-light-primary !default;
$tabs-font-family: $body-font-family-secondary !default;
$tabs-font-size: $font-size-regular-mobile !default;
$tabs-font-size-desktop: $font-size-regular-desktop !default;
$tabs-font-weight: $body-font-weight-secondary !default;
$tabs-line-height: 1.6 !default;
$tabs__title-padding-y: $spacer-big !default;
$tabs__title-color: $c-gray-secondary !default;
$tabs__title-color--active: $c-dark-primary !default;
$tabs__title-color--hover: $c-dark-primary !default;
$tabs__title-font-size: $font-size-big-mobile !default;
$tabs__title-font-size-desktop: $font-size-big-desktop !default;
$tabs__content-padding-y: 3 * $spacer-big !default;

You can override SCSS variable values bound to this component in sfui.scss in the root of your project.

# Internal components

# Tab

# Props

  • title
    • Tab title.
    • type: string
    • defaultValue: "MenuItem"

# Slots

  • default
    • Default. Here you should pass your tab content

# Events

None.

# CSS modifiers

None.

# SCSS variables

None.

# Partials

If you want to customize this component even more you can use its partials for limitless customization.

<template lang="html" src="@storefront-ui/vue/src/components/organisms/SfTabs/SfTabs.html"></template>
<script src="@storefront-ui/vue/src/components/organisms/SfTabs/SfTabs.js"></script>
<style lang="scss">
@import "~@storefront-ui/shared/styles/components/SfTabs.scss";
</style>

You can read about using component partials here

# Play with this component

See all available configurations and play with this component on Storybook.