Se emplean para resaltar texto dentro de una tabla o una página y para identificar elementos independientes entre sí (categorías, filtros…).
Pill
Mostrar parámetros
Parámetros Nunjucks del componente: "Pill"
params:
- name: text
type: string
required: true
description: If `html` is set, this is not required. Text to use within the pill component. If `html` is provided, the `text` argument will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. HTML to use within the pill component. If `html` is provided, the `text` argument will be ignored.
- name: type
type: string
required: false
description: Type of `a`, `button` or `span`. Defaults to `span`.
- name: href
type: string
required: false
description: The value of the pill’s `href` attribute. Defaults to `#content` if you do not provide a value.
- name: target
type: string
required: false
description: The target where the pill should link to.
- name: classes
type: string
required: false
description: Classes to add to the pill.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the pill.
Por defecto #
Recuerda que los pills, por accesibilidad, deben estar rodeados de una etiqueta semántica, normalmente un <li>.
Mostrar códigodel ejemplo: Por defecto
Mostrar códigodel ejemplo: Tipo enlace
Tipo enlace con target blank #
Mostrar códigodel ejemplo: Tipo enlace con target blank
Mostrar códigodel ejemplo: Tipo botón
Tipo enlace o botón con estado hover #
Simula activar la pseudoclase de CSS :hover
Mostrar códigodel ejemplo: Tipo enlace o botón con estado hover
Tipo enlace o botón con estado focus #
Simula activar la pseudoclase de CSS :focus
Mostrar códigodel ejemplo: Tipo enlace o botón con estado focus
Peque #
Usa las clases de tamaño de texto para establecer el tamaño. Recuerda que los pills, por accesibilidad, deben estar rodeados de una etiqueta semántica, normalmente un <li>
Mostrar códigodel ejemplo: Peque
Mostrar códigodel ejemplo: Con icono a la derecha
Con icono a la izquierda #
Mostrar códigodel ejemplo: Con icono a la izquierda
Mostrar códigodel ejemplo: Primario
Mostrar códigodel ejemplo: Aviso
Mostrar códigodel ejemplo: Éxito
Mostrar códigodel ejemplo: Alerta