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>

Tabs allow users to navigate between views within the same page or context.
See Also:
  • Method Details

    • tabs

      public static Tabs tabs()
    • tabs

      public static <E extends HTMLElement> Tabs tabs(HTMLContainerBuilder<E> builder)
    • attach

      public void attach(MutationRecord mutationRecord)
      Specified by:
      attach in interface Attachable
    • detach

      public void detach(MutationRecord mutationRecord)
      Specified by:
      detach in interface Attachable
    • addItems

      public <T> Tabs addItems(Iterable<T> items, Function<T,Tab> display)
      Specified by:
      addItems in interface HasItems<HTMLElement,Tabs,Tab>
    • add

      public Tabs add(Tab tab)
      Specified by:
      add in interface HasItems<HTMLElement,Tabs,Tab>
    • box

      public Tabs box(boolean box)
      Specified by:
      box in interface Modifiers.Box<HTMLElement,Tabs>
    • closeable

      public Tabs closeable()
    • closeable

      public Tabs closeable(CloseHandler<Tab> closeHandler)
    • expandable

      public Tabs expandable(ExpandableModifier expandable)
      Same as expandable(breakpoints(default_, expandable))
    • expandable

      public Tabs expandable(Breakpoints<ExpandableModifier> expandable)
      Enable expandable vertical tabs at various breakpoints (Modifiers.Vertical.vertical() should be set to true for this to work).
    • fill

      public Tabs fill(boolean fill)
      Specified by:
      fill in interface Modifiers.Fill<HTMLElement,Tabs>
    • lightTabs

      public Tabs lightTabs()
    • lightTabs

      public Tabs lightTabs(boolean lightTabs)
      Enables lightTabs styling to the tab component
    • inset

      public Tabs inset(Inset inset)
      Same as inset(breakpoints(default_, inset))
    • inset

      public Tabs inset(Breakpoints<Inset> inset)
      Insets at various breakpoints.
    • noBorderBottom

      public Tabs noBorderBottom()
    • noBorderBottom

      public Tabs noBorderBottom(boolean noBorderBottom)
      Disables border bottom tab styling on tabs. Defaults to false. To remove the bottom border, set this prop to true.
    • pageInsets

      public Tabs pageInsets(boolean pageInsets)
      Specified by:
      pageInsets in interface Modifiers.PageInsets<HTMLElement,Tabs>
    • overflowHorizontal

      public 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

      public Tabs overflowHorizontal(String overflowText)
      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

      public Tabs noInitialSelection()
      By default, the first tab is selected initially. Call this method to disable thi default behaviour.
    • secondary

      public Tabs secondary(boolean secondary)
      Enables secondary styling to the tab component
      Specified by:
      secondary in interface Modifiers.Secondary<HTMLElement,Tabs>
    • showTabCount

      public Tabs showTabCount()
    • showTabCount

      public Tabs showTabCount(boolean showTabCount)
      Flag which shows the count of overflowing tabs when enabled
    • toggleText

      public Tabs toggleText(String text)
      Text that appears in the expandable toggle. If not set, the text of the selected tab is used.
    • vertical

      public Tabs vertical(boolean vertical)
      Specified by:
      vertical in interface Modifiers.Vertical<HTMLElement,Tabs>
    • that

      public Tabs that()
      Specified by:
      that in interface TypedBuilder<HTMLElement,Tabs>
    • ariaLabel

      public Tabs ariaLabel(String label)
      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

      public Tabs ariaAddLabel(String label)
      Aria-label for the add button.
    • ariaScrollBackLabel

      public Tabs ariaScrollBackLabel(String label)
      Aria-label for the back scroll button
    • ariaScrollForwardLabel

      public Tabs ariaScrollForwardLabel(String label)
      Aria-label for the forward scroll button
    • ariaOverflowLabel

      public Tabs ariaOverflowLabel(String label)
      The aria label applied to the button which toggles the tab overflow menu
    • ariaToggleLabel

      public Tabs ariaToggleLabel(String label)
      Aria-label for the expandable toggle
    • onAdd

      public Tabs onAdd(Function<Tabs,Tab> addHandler)
      Callback for the add button. Passing this property inserts the add button.
    • onClose

      public Tabs onClose(CloseHandler<Tab> closeHandler)
    • onSelect

      public Tabs onSelect(SelectHandler<Tab> selectHandler)
    • onToggle

      public Tabs onToggle(ToggleHandler<Tabs> toggleHandler)
    • expanded

      public boolean expanded()
      Specified by:
      expanded in interface Expandable<HTMLElement,Tabs>
      Returns:
      true if the elements class list has the modifier Classes.expanded, false otherwise.
    • collapse

      public void collapse(boolean fireEvent)
      Specified by:
      collapse in interface Expandable<HTMLElement,Tabs>
    • expand

      public void expand(boolean fireEvent)
      Specified by:
      expand in interface Expandable<HTMLElement,Tabs>
    • close

      public void close(String identifier)
    • close

      public void close(Tab tab)
    • select

      public void select(String identifier)
    • select

      public void select(Tab tab)
    • currentTab

      public Tab currentTab()
    • tab

      public Tab tab(String id)
    • iterator

      public Iterator<Tab> iterator()
      Specified by:
      iterator in interface Iterable<Tab>
    • size

      public int size()
      Specified by:
      size in interface HasItems<HTMLElement,Tabs,Tab>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface HasItems<HTMLElement,Tabs,Tab>
    • clear

      public void clear()
      Specified by:
      clear in interface HasItems<HTMLElement,Tabs,Tab>