component Button { outputs { click(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) focus(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) blur(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object }) } props { label: string = "Button" loadingLabel: string = "Loading…" description: string = "" as: string = "" href: string = "" target: string = "" rel: string = "" type: string = "button" variant: string = "default" color: string = "primary" size: string = "default" disabled: boolean = false loading: boolean = false pill: boolean = false fullWidth: boolean = false icon: string = "" iconPosition: string = "start" ariaLabel: string = "" ariaPressed: string = "" ariaExpanded: string = "" ariaControls: string = "" title: string = "" autofocus: boolean = false controlClass: string = "" class: string = "" } view { {#if as === "a" || (as === "" && href)} {#if loading} {/if} {#if icon && !loading && iconPosition === "start"} {/if} {loading ? loadingLabel : label} {#if description && !loading} {description} {/if} {#if icon && !loading && iconPosition === "end"} {/if} {#if (size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg") && (ariaLabel || label)} {/if} {:else} {/if} } style { /* --- Button --------------------------------------------------------------- */ .wire-action { position: relative; display: inline-flex; } .wire-btn--pill { border-radius: 999px; } .wire-btn--with-description { min-height: 3.5rem; justify-content: flex-start; padding: 0.6rem 0.875rem; text-align: left; } .wire-btn__copy { display: grid; min-width: 0; gap: 0.15rem; } .wire-btn__description { color: currentColor; font-size: 0.75rem; font-weight: 450; line-height: 1.35; opacity: 0.74; } .wire-btn__tooltip { position: absolute; z-index: 80; inset-block-end: calc(100% + 0.5rem); inset-inline-start: 50%; width: max-content; max-width: min(16rem, calc(100vw - 2rem)); padding: 0.4rem 0.6rem; color: var(--wire-color-bg); background: var(--wire-color-text); border: 1px solid color-mix(in srgb, var(--wire-color-text) 85%, var(--wire-color-border)); border-radius: var(--wire-radius-sm); box-shadow: var(--wire-shadow-2); font-size: 0.75rem; font-weight: 600; line-height: 1.25; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 0.25rem); transition: opacity var(--wire-motion-fast) var(--wire-ease-standard), transform var(--wire-motion-fast) var(--wire-ease-standard); } } }