Skip to content

co-drive-card

This content is not available in your language yet.

Tarjeta de elemento de Drive con chip de selección en la esquina, anillo de selección y estrella. La variante folder es una fila; la variante file es una columna con una región de miniatura (slot thumb).

Ver código
<co-drive-card variant="folder" name="Campañas 2026" meta="18 elementos · 240 MB" starred></co-drive-card>

Props

PropAtributoTipoDefaultDescripción
accentaccentstring'var(--co-color-primary-azul)'Accent CSS color driving the icon tile, selection ring and select chip.
activeactivebooleanfalse(file) Whether the item is the active/current item — draws a heavier inset ring.
densitydensity"comfy" | "compact"'comfy'Vertical rhythm / sizing.
extextstring | undefined(file) File extension used to render a default <co-file-type-tile> in the foot when the `type` slot is empty.
metametastring''Muted secondary line (meta).
namenamestring''Primary label (name).
selectedselectedbooleanfalseWhether the item is selected. Controlled — parent updates it on coToggleSelect.
starredstarredbooleanfalseWhether the item is starred.
variantvariant"file" | "folder"'folder'Which layout to render.

Eventos

EventoDetailBubblesCancelableDescripción
coOpenvoidFired when the card is activated (click / Enter / Space).
coStarvoidFired when the star affordance is clicked.
coToggleSelectbooleanFired when the select chip is toggled — emits the NEW selected state.

Slots

SlotDescripción
actions(file) The fading action affordance in the foot row.
thumb(file) The thumbnail region at the top of the card.
trailing(folder) Trailing content after the star (e.g. a dots menu).
type(file) The file-type tile in the foot row. Falls back to <co-file-type-tile> when `ext` is set.

CSS Parts

PartDescripción
::part(actions)
::part(card)
::part(foot)
::part(meta)
::part(name)
::part(select)
::part(star)
::part(thumb)
::part(tile)
::part(trailing)

CSS Custom Properties

Este componente no expone CSS custom properties.