ThemeTabs
A tabbed interface component with theme support.
ThemeTabs
A component that creates a tabbed interface with support for both fixed and scrollable tab layouts, automatic theme adaptation, and animated tab switching.
Import
Features
- Fixed or scrollable tab header layouts
- Smooth animated tab transitions
- Support for custom header and footer components
- Touch-based tab switching
- Automatic theme adaptation
- Swipeable tab content
Props
ThemeTabs Props
Prop | Type | Default | Description |
---|---|---|---|
children | ReactNode | Required | ThemeTab components to display |
headerComponent | ReactNode | — | Component to display above tabs |
footerComponent | ReactNode | — | Component to display below tabs |
type | 'scrollview' | 'fixed' | 'fixed' | Layout type for the tab headers |
ThemeTab Props
Prop | Type | Default | Description |
---|---|---|---|
name | string | Required | Label for the tab |
children | ReactNode | Required | Content for the tab |
Basic Usage
Header Component Example
The headerComponent
prop allows you to add a fixed header above the tab navigation. This header will scroll with the content until it reaches the top, then the tab navigation becomes sticky.
With the above example:
- The header with the profile information will be visible above the tabs
- As you scroll down, the header will scroll up until the tabs reach the top
- Once tabs reach the top, they will stick there while content continues scrolling
- The tabs will remain visible at the top, allowing easy navigation between sections