Prototype library

Button

The inherited Ecology button, wearing the CBFish skin. Primary picks up brand navy because the theme re-points --color-primary; the rest of the palette is inherited.

Inherited .astro import EsaButton from '@esa/ecology/esa-button.astro';

Colors

<EsaButton color="primary">Save</EsaButton>

Outline

<EsaButton color="primary" appearance="outline">Save</EsaButton>

Sizes

<EsaButton size="xs">Save</EsaButton>

States

<EsaButton color="ghost">Cancel</EsaButton>
<EsaButton disabled>Disabled</EsaButton>
<EsaButton loading>Saving</EsaButton>

API

PropTypeDefaultDescription
color 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'info' | 'ai' | 'ghost' 'primary' Semantic color role. CBFish navy comes from --color-primary.
appearance 'fill' | 'outline' 'fill' Solid or outlined.
size 'xs' | 'sm' | 'md' | 'lg' 'md' Control size.
disabled boolean false Non-interactive state.
loading boolean false Shows a spinner and blocks input.