# Tabs URL: /components/tabs Source: https://github.com/daangn/seed-design/blob/dev/docs/content/components/tabs.mdx A component that allows you to divide and switch content by tabs within a single screen. ## Anatomy ![Tabs Anatomy image (Line Type)]() ![Tabs Anatomy image (Chip Type)]() Tabs is composed of a collection of Tab Items with Labels. Tab Items can optionally display [Notification Badge](/components/notification-badge) as needed. ## Properties ### Variant ![Tabs Variant Property - Line Type and Chip Type]() Tabs component is composed of two types. | Type | Style/Layout | | -------- | ---------------------------------------------------------------------------------- | | **Line** | Fill layout (Tab Item displayed fully), Hug layout (displayed to fit label length) | | **Chip** | Solid style, Outline style | ### Size ![Tabs Line Type Size - Medium, Small]() ![Tabs Chip Type Size - Large, Medium]() Line type has two Sizes: Medium and Small. Chip type has two Sizes: Large and Medium. ### State ![Tabs State - Enabled, Selected, Disabled]() Tab Items have Enabled, Selected, and Disabled states. ### Notification Property ![Tabs Notification Property - Notification Badge display example]() You can display [Notification Badge](/components/notification-badge) on Tab Items to notify that there is new content in the tab. ## Guidelines ### Choosing Tabs Size and Style ![Line Style - Medium and Small sizes]() ![Chip Style - Large and Medium sizes]() Tabs component is composed of two styles: Line and Chip. Line type provides two sizes: Medium and Small, while Chip type provides two sizes: Large and Medium. You can choose and use different styles and sizes depending on the combination with other elements on the screen and prominence. Large size is suitable for a Navigation role that switches entire screen content, while Medium size is used for switching sub-content in narrow areas or during scrolling. When using Chip type, it is recommended to use Solid style when switching the entire screen content, and Outline style when switching partial content. ![Example of combining Line style Tabs with Filter Chip]() Also, when used in combination with other [Chip](/components/chip) elements on the screen, different styles should be applied to avoid confusion in operation. ### Using Fill and Hug Layouts in Line Style ![Fill layout example]() ![Hug layout example]() In Line type, you can use Fill layout that displays Tab Items fully and Hug layout that displays Tab Items to fit label length. Fill layout is suitable when there are not many Tab Items and can display up to 5 tabs. **When there are 6 or more Tab Items or labels are long, it is recommended to use Hug layout.** ### Notifying of New Content in Tabs ![Example of displaying Notification Badge only on event tab]() You can display Notification Badge on Tab Items to indicate new content. **Notification Badge disappears when content is confirmed, and should not be displayed on multiple tabs simultaneously.** ### Using Tabs Structure with 2 Depth ![2 Depth Tabs structure example - Line Fill + Solid Chip, Line Hug + Outline Chip]() When displaying the Tabs structure in duplicate, such as with secondary categories, combine different styles of tabs. **It is recommended to combine Line type for primary classification and Chip type Tabs for secondary classification.** ## Specification ### Tablist Component spec (JSON): /rootage/components/tablist.json ### Tab Component spec (JSON): /rootage/components/tab.json ### Chip Tablist Component spec (JSON): /rootage/components/chip-tablist.json