Skip to content

Tabs ​

Basic

Loading...

With Disabled Tab

Loading...

<flint-tab> ​

Tab: an individual tab button within a tab list.

  • Tag: <flint-tab>
  • Class: FlintTab

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTab } from '@getufy/flint-ui';

Usage ​

html
<flint-tab></flint-tab>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Unique identifier for this tab.
disableddisabledbooleanfalseWhether the tab is disabled.
selectedselectedbooleanfalseWhether the tab is currently selected.
closableclosablebooleanfalseWhether the tab shows a close button.
iconPositionicon-position'top' | 'bottom' | 'start' | 'end''start'Position of the icon slot relative to the label.
hrefhrefstring''URL to navigate to, renders the tab as a link.
fullWidthfull-widthbooleanfalseWhether the tab stretches to fill available width.

Events ​

EventDetailDescription
flint-tab-click—Fired when the tab is clicked or activated via keyboard.
flint-tab-close&#123; value: string &#125;Fired when the close button is clicked. detail: &#123; value: string &#125;

CSS Parts ​

NameDescription
tabThe tab button or anchor element.
close-buttonThe close button element (when closable).

CSS Custom Properties ​

PropertyDefault
--flint-tab-border-colorvar(--flint-border-color
--flint-tab-scroll-btn-size40px
--flint-tab-indicator-colorvar(--flint-tabs-ind-color, var(--flint-primary-color
--flint-tab-indicator-radius3px
--flint-tab-indicator-height3px
--flint-tab-indicator-width3px
--flint-tab-panel-padding24px
--flint-tab-padding-y10px
--flint-tab-padding-x16px
--flint-tab-min-height48px
--flint-tab-font-size0.875rem
--flint-tab-font-weight500
--flint-tab-inactive-color—
--flint-tab-active-color—
--flint-tab-hover-bgvar(--flint-primary-color-light
--flint-tab-font-weight-active600
--flint-tab-disabled-opacity0.38
--flint-tab-icon-min-height72px
--flint-border-color—
--flint-primary-color—
--flint-background—
--flint-text-color-muted—
--flint-text-color—
--flint-hover-color—
--flint-font-family—
--flint-primary-color-light—

Methods ​

MethodDescription
focusInner(): void

<flint-tab-panel> ​

Tab Panel: content container shown when its corresponding tab is active.

  • Tag: <flint-tab-panel>
  • Class: FlintTabPanel

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTabPanel } from '@getufy/flint-ui';

Usage ​

html
<flint-tab-panel></flint-tab-panel>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Identifier linking this panel to its corresponding tab.

CSS Parts ​

NameDescription
panelThe panel content wrapper element.

CSS Custom Properties ​

PropertyDefault
--flint-tab-panel-padding24px

<flint-tab-list> ​

  • Tag: <flint-tab-list>
  • Class: FlintTabList

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTabList } from '@getufy/flint-ui';

Usage ​

html
<flint-tab-list></flint-tab-list>

Properties ​

PropertyAttributeTypeDefaultDescription
orientationorientationOrientation'horizontal'Layout direction of the tab list.
variantvariant'standard' | 'fullWidth' | 'scrollable''standard'Display variant controlling tab sizing and scrollability.
centeredcenteredbooleanfalseWhether to center the tabs within the tab list.
scrollButtonsscroll-buttons'auto' | 'false''auto'Whether to show scroll buttons in scrollable mode.
ariaLabelaria-labelstring''Accessible label for the tab list.
activationactivation'automatic' | 'manual''automatic'Tab activation mode passed down from flint-tabs.
placementplacementTabPlacement'top'Tab placement passed down from flint-tabs.

Methods ​

MethodDescription
syncIndicator(): void

<flint-tabs> ​

Tabs: container that coordinates tab selection and panel visibility.

  • Tag: <flint-tabs>
  • Class: FlintTabs

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintTabs } from '@getufy/flint-ui';

Usage ​

html
<flint-tabs></flint-tabs>

Properties ​

PropertyAttributeTypeDefaultDescription
valuevaluestring''Current active tab value (controlled). When set, the component reflects this value and does not manage its own state.
orientationorientationOrientation'horizontal'Layout direction of the tabs.
variantvariant'standard' | 'fullWidth' | 'scrollable''standard'Display variant controlling tab sizing and scrollability.
centeredcenteredbooleanfalseWhether to center the tabs.
scrollButtonsscroll-buttons'auto' | 'false''auto'Whether to show scroll buttons in scrollable mode.
textColortext-colorstring'primary'Text color: 'primary' | 'secondary' | 'inherit' | any CSS color.
indicatorColorindicator-colorstring'primary'Indicator color: 'primary' | 'secondary' | any CSS color.
defaultValuedefault-valuestring''Initial value (uncontrolled). Only used on first render; ignored after mount.
placementplacementTabPlacement'top'Where the tab list is placed relative to the panels.
activationactivation'automatic' | 'manual''automatic'Tab activation mode.

Events ​

EventDetailDescription
flint-tab-change&#123; value: string &#125;Fired when the active tab changes. detail: &#123; value: string &#125;

CSS Parts ​

NameDescription
baseThe tabs root container.
navThe tab navigation container.
indicatorThe active tab indicator element.