Skip to content

co-icon-button

This content is not available in your language yet.

Ver código
<co-icon-button icon="bell" variant="outlined"></co-icon-button>
<co-icon-button icon="gear" variant="ghost"></co-icon-button>
<co-icon-button icon="plus" variant="primary"></co-icon-button>

Props

PropAtributoTipoDefaultDescripción
boxSizebox-sizenumber | undefinedOverride the container box in px (width === height). When set, takes precedence over the `size` class dimensions — lets you hit 32/36/40 rounded squares. When omitted, the `size` class dimensions apply (unchanged behavior).
disableddisabledbooleanfalseDisabled state
iconiconstring | undefinedPhosphor icon name (e.g. "plus", "gear"). Renders co-icon inside the button.
iconSizeicon-sizenumber | undefinedOverride the rendered icon size in px. When set, takes precedence over the per-`size` icon default (which is otherwise unchanged — e.g. 16px at xs).
iconWeighticon-weight"bold" | "duotone" | "fill" | "light" | "regular" | "thin"'regular'Icon weight
labellabelstring''Accessible label
shapeshape"rounded" | "square"'rounded'Shape: pill or straight corners
sizesize"lg" | "md" | "sm" | "xl" | "xs" | "xxs"'md'Size — maps to container dimensions: xl=80, lg=64, md=56, sm=48, xs=32, xxs=24
surfacesurface"dark" | "light"'light'Surface the button sits on. `dark` → white icon + blanco-16 hover (on-dark theming). Defaults to `light` (no extra class → identical to previous behavior).
variantvariant"filled" | "ghost" | "outlined"'filled'filled = dark background (negro), outlined = light background (blanco + border), ghost = transparent background, no border, tinted hover (negro-8 on light / blanco-16 on dark). Matches Figma: Secundario → filled, Primario → outlined

Eventos

Este componente no emite eventos personalizados.

Slots

Este componente no expone slots.

CSS Parts

PartDescripción
::part(button)

CSS Custom Properties

Este componente no expone CSS custom properties.