Tab
<gstock-tab>
|
GstockTab
API
Propiedades
| Nombre | Descripción | Reflects | Tipo | Por defecto |
|---|---|---|---|---|
active
|
Draws the tab in an active state. |
|
boolean
|
false
|
closable
|
Makes the tab closable and shows a close button. |
boolean
|
false
|
|
disabled
|
Disables the tab and prevents selection. |
|
boolean
|
false
|
icon
|
Icon name of the tab. |
|
string | undefined
|
-
|
panel
|
The name of the tab panel this tab is associated with. The panel must be located in the same tab group. |
|
string
|
''
|
color
|
The color of the tab. |
|
'primary' | 'secondary'
|
'primary'
|
download
|
Tells the browser to download the linked file as this filename. Only used
when href is present.
|
string | undefined
|
-
|
|
href
|
When set, the underlying button will be rendered as an
<a> with this href instead of a
<div>.
|
string
|
''
|
|
rel
|
When using href, this attribute will map to the underlying
link’s rel attribute. Unlike regular links, the default is
noreferrer noopener to prevent security exploits. However, if
you’re using target to point to a specific tab/window, this
will prevent that from working correctly. You can remove or change the
default value by setting the attribute to an empty string or a value of
your choice, respectively.
|
string
|
'noreferrer noopener'
|
|
target
|
Tells the browser where to open the link. Only used when
href is present.
|
'_blank' | '_parent' | '_self' | '_top'
|
-
|
|
updateComplete
|
A read-only promise that resolves when the component has finished updating. |
Aprende más sobre atributos y propiedades .
Eventos
| Nombre | React Event | Descripción | Event Detail |
|---|---|---|---|
gstock-close-event
|
onGstockCloseEvent
|
Emitted when the tab is closable and the close button is activated. |
CustomEvent
|
Aprende más sobre eventos .
Slots
| Nombre | Descripción |
|---|---|
default
|
-The label of the tab. |
Aprende más sobre slots .
Métodos
| Nombre | Descripción |
|---|---|
focus(
|
Sets focus to the tab. |
blur( )
|
Removes focus from the tab. |
Aprende más sobre métodos .
Partes
| Nombre | Descripción |
|---|---|
base
|
The component’s base wrapper. |
close-button
|
The close button, an <gstock-icon-button>. |
close-button__base
|
The close button’s exported base part. |
Aprende más sobre partes CSS .
Dependencias
Este componente importa automáticamente las siguientes dependencias.