Tabs provide a way to navigate between panels that display related content.
import { DaffTabsComponent } from '@daffodil/design/tabs'
Tabs provide a way to navigate between panels that display related content.
@Component()
class DaffTabsComponent implements AfterContentInit, OnInit {
@Input() initiallySelected: string = null
@Input() linkMode: boolean = false
@Input() url: string
@Input() queryParam: string = 'tab'
@Output() tabChange: EventEmitter<string> = new EventEmitter<string>()
}
string
Default | null |
---|---|
Description | The tab that is selected on initial load. If it's not used, the first tab in the tablist will be selected by default. |
boolean
Default | false |
---|---|
Description | Replace the tab buttons as links. |
string
Default | – |
---|---|
Description | The URL to navigate to when the component is in link mode. This component will set the specified query param. |
string
Default | 'tab' |
---|---|
Description | The query parameter that the tabs component will use to set the tab value in link mode. |
EventEmitter<string>
Default | – |
---|---|
Description | Event emitted when tab selection changes. |
import { DaffTabPanelComponent } from '@daffodil/design/tabs'
DaffTabPanelComponent is used to display the content panel of a tab.
@Component()
class DaffTabPanelComponent {}
import { DaffTabComponent } from '@daffodil/design/tabs'
DaffTabComponet
is an element in the tab list that is used as a content container to group the label of a tab panel and the tab panel together.
A <daff-tab>
should include the DaffTabLabelComponent and DaffTabPanelComponent components in order to properly structure the UI.
@Component()
class DaffTabComponent {
@Input() disabled: boolean = false
@Input() id: string = 'daff-tab-' + tabId
}
boolean
Default | false |
---|---|
Description | Whether the tab is disabled. |
string
Default | 'daff-tab-' + tabId |
---|---|
Description | A unique id for the tab component. The |
import { DaffTabLabelComponent } from '@daffodil/design/tabs'
DaffTabLabelComponent is used to display the label of a tab panel. Labels may optionally contain a daffPrefix
or daffSuffix
to add icons or badges.
@Component()
class DaffTabLabelComponent implements DaffPrefixable, DaffSuffixable {}