NoRedInk/noredink-ui/16.0.0

NOTE: the latest version is 35.9.3

Nri.Ui.Tabs.V7

Patch changes:

  • use Tooltip.V3 instead of Tooltip.V2

Changes from V6:

  • Changes Tab construction to follow attributes-based approach
  • Adds tooltip support
  • combine onFocus and onSelect into focusAndSelect msg handler (for tooltips)
{ title : Maybe String
, alignment : Alignment
, customSpacing : Maybe Float
, focusAndSelect :
{ select : id
, focus : Maybe String
}
-> msg
, selected : id
, tabs : List (Tab id msg)
}
-> Html msg
= Left
| Center
| Right

Determines whether tabs are centered or floating to the left or right.

type Tab id msg
type Attribute id msg
{ id : id
, idString : String
}
-> List (Attribute id msg)
-> Tab id msg
tabString : String -> Attribute id msg
tabHtml : Html Never -> Attribute id msg
withTooltip : List (Attribute msg) -> Attribute id msg

Tooltip defaults: [Tooltip.smallPadding, Tooltip.onBottom, Tooltip.fitToContent]

disabled : Bool -> Attribute id msg

Makes it so that the tab can't be clicked or focused via keyboard navigation

labelledBy : String -> Attribute id msg

Sets an overriding labelledBy on the tab for an external tooltip. This assumes an external tooltip is set and disables any internal tooltip configured.

describedBy : String -> Attribute id msg

Like labelledBy, but it describes the given element instead of labeling it.

This attribute can be used multiple times if more than one element describes this tab.

panelHtml : Html msg -> Attribute id msg
spaHref : String -> Attribute id msg