Package org.patternfly.component.tabs
Class Tabs
- All Implemented Interfaces:
Iterable<Tab>
,Attachable
,Finder<HTMLElement>
,HasElement<HTMLElement,
,Tabs> HasHTMLElement<HTMLElement,
,Tabs> IsElement<HTMLElement>
,TypedBuilder<HTMLElement,
,Tabs> Component
,Expandable<HTMLElement,
,Tabs> HasItems<HTMLElement,
,Tabs, Tab> Modifiers.Box<HTMLElement,
,Tabs> Modifiers.Fill<HTMLElement,
,Tabs> Modifiers.PageInsets<HTMLElement,
,Tabs> Modifiers.Secondary<HTMLElement,
,Tabs> Modifiers.Vertical<HTMLElement,
Tabs>
public class Tabs
extends BaseComponentFlat<HTMLElement,Tabs>
implements Attachable, Modifiers.Box<HTMLElement,Tabs>, Expandable<HTMLElement,Tabs>, Modifiers.Fill<HTMLElement,Tabs>, HasItems<HTMLElement,Tabs,Tab>, Modifiers.PageInsets<HTMLElement,Tabs>, Modifiers.Secondary<HTMLElement,Tabs>, Modifiers.Vertical<HTMLElement,Tabs>
Tabs allow users to navigate between views within the same page or context.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> Tabs
ariaAddLabel
(String label) Aria-label for the add button.Provides an accessible label for the tabs.ariaOverflowLabel
(String label) The aria label applied to the button which toggles the tab overflow menuariaScrollBackLabel
(String label) Aria-label for the back scroll buttonariaScrollForwardLabel
(String label) Aria-label for the forward scroll buttonariaToggleLabel
(String label) Aria-label for the expandable togglevoid
attach
(MutationRecord mutationRecord) box
(boolean box) void
clear()
void
void
closeable
(CloseHandler<Tab> closeHandler) void
collapse
(boolean fireEvent) void
detach
(MutationRecord mutationRecord) void
expand
(boolean fireEvent) expandable
(Breakpoints<ExpandableModifier> expandable) Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()
should be set to true for this to work).expandable
(ExpandableModifier expandable) Same asexpandable(breakpoints(default_, expandable))
boolean
expanded()
fill
(boolean fill) inset
(Breakpoints<Inset> inset) Insets at various breakpoints.Same asinset(breakpoints(default_, inset))
boolean
isEmpty()
iterator()
Same as lightTabs(true)lightTabs
(boolean lightTabs) Enables lightTabs styling to the tab componentSame as noBorderBottom(true)noBorderBottom
(boolean noBorderBottom) Disables border bottom tab styling on tabs.By default, the first tab is selected initially.Callback for the add button.onClose
(CloseHandler<Tab> closeHandler) onSelect
(SelectHandler<Tab> selectHandler) onToggle
(ToggleHandler<Tabs> toggleHandler) Flag which places overflowing tabs into a menu triggered by the last tab.overflowHorizontal
(String overflowText) Flag which places overflowing tabs into a menu triggered by the last tab.pageInsets
(boolean pageInsets) secondary
(boolean secondary) Enables secondary styling to the tab componentvoid
void
Same as showTabCount(true)showTabCount
(boolean showTabCount) Flag which shows the count of overflowing tabs when enabledint
size()
static Tabs
tabs()
static <E extends HTMLElement>
Tabstabs
(HTMLContainerBuilder<E> builder) that()
toggleText
(String text) Text that appears in the expandable toggle.vertical
(boolean vertical) Methods inherited from class org.patternfly.component.BaseComponentFlat
componentType, element
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.patternfly.component.Expandable
collapse, expand, toggle, toggle
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.patternfly.style.Modifiers.Box
box
Methods inherited from interface org.patternfly.style.Modifiers.Fill
fill
Methods inherited from interface org.patternfly.style.Modifiers.PageInsets
pageInsets
Methods inherited from interface org.patternfly.style.Modifiers.Secondary
secondary
Methods inherited from interface org.patternfly.style.Modifiers.Vertical
vertical
-
Method Details
-
tabs
-
tabs
-
attach
- Specified by:
attach
in interfaceAttachable
-
detach
- Specified by:
detach
in interfaceAttachable
-
addItems
- Specified by:
addItems
in interfaceHasItems<HTMLElement,
Tabs, Tab>
-
add
- Specified by:
add
in interfaceHasItems<HTMLElement,
Tabs, Tab>
-
box
- Specified by:
box
in interfaceModifiers.Box<HTMLElement,
Tabs>
-
closeable
-
closeable
-
expandable
Same asexpandable(breakpoints(default_, expandable))
-
expandable
Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical()
should be set to true for this to work). -
fill
- Specified by:
fill
in interfaceModifiers.Fill<HTMLElement,
Tabs>
-
lightTabs
Same as lightTabs(true) -
lightTabs
Enables lightTabs styling to the tab component -
inset
Same asinset(breakpoints(default_, inset))
-
inset
Insets at various breakpoints. -
noBorderBottom
Same as noBorderBottom(true) -
noBorderBottom
Disables border bottom tab styling on tabs. Defaults to false. To remove the bottom border, set this prop to true. -
pageInsets
- Specified by:
pageInsets
in interfaceModifiers.PageInsets<HTMLElement,
Tabs>
-
overflowHorizontal
Flag which places overflowing tabs into a menu triggered by the last tab. Unlike other flags, this can only be turned on, but not off. -
overflowHorizontal
Flag which places overflowing tabs into a menu triggered by the last tab. Unlike other flags, this can only be turned on, but not off. -
noInitialSelection
By default, the first tab is selected initially. Call this method to disable thi default behaviour. -
secondary
Enables secondary styling to the tab component- Specified by:
secondary
in interfaceModifiers.Secondary<HTMLElement,
Tabs>
-
showTabCount
Same as showTabCount(true) -
showTabCount
Flag which shows the count of overflowing tabs when enabled -
toggleText
Text that appears in the expandable toggle. If not set, the text of the selected tab is used. -
vertical
- Specified by:
vertical
in interfaceModifiers.Vertical<HTMLElement,
Tabs>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLElement,
Tabs>
-
ariaLabel
Provides an accessible label for the tabs. Labels should be unique for each set of tabs that are present on a page. When component is set to nav, this prop should be defined to differentiate the tabs from other navigation regions on the page. -
ariaAddLabel
Aria-label for the add button. -
ariaScrollBackLabel
Aria-label for the back scroll button -
ariaScrollForwardLabel
Aria-label for the forward scroll button -
ariaOverflowLabel
The aria label applied to the button which toggles the tab overflow menu -
ariaToggleLabel
Aria-label for the expandable toggle -
onAdd
Callback for the add button. Passing this property inserts the add button. -
onClose
-
onSelect
-
onToggle
-
expanded
public boolean expanded()- Specified by:
expanded
in interfaceExpandable<HTMLElement,
Tabs> - Returns:
true
if the elements class list has the modifierClasses.expanded
,false
otherwise.
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapse
in interfaceExpandable<HTMLElement,
Tabs>
-
expand
public void expand(boolean fireEvent) - Specified by:
expand
in interfaceExpandable<HTMLElement,
Tabs>
-
close
-
close
-
select
-
select
-
currentTab
-
tab
-
iterator
-
size
public int size()- Specified by:
size
in interfaceHasItems<HTMLElement,
Tabs, Tab>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceHasItems<HTMLElement,
Tabs, Tab>
-
clear
public void clear()- Specified by:
clear
in interfaceHasItems<HTMLElement,
Tabs, Tab>
-