The ColorModeButton component extends the Button component, so you can pass any property such as color, size, etc.
color
size
<template> <B24ColorModeButton /> </template>
color="air-tertiary-no-accent"
as
'button'
any
The element or component this component should render as when not a link.
'air-tertiary-no-accent'
"air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost"
loading
boolean
When true, the loading icon will be displayed.
true
icon
IconComponent
Display an icon on the left side.
'md'
"md" | "xs" | "sm" | "lg" | "xl" | "xss"
avatar
AvatarProps
Display an avatar on the left side.
autofocus
false | true | "true" | "false"
disabled
name
string
type
"reset" | "submit" | "button"
The type of the button when not a link.
isAction
When true, uses special underlined styling.
label
activeColor
rounded
false
Rounds the corners of the button
block
Render the button full width
loadingAuto
Set loading state automatically based on the @click promise state
@click
normalCase
Disable uppercase label
useWait
Shows LoaderWaitIcon in loading mode
useClock
Shows LoaderClockIcon icon in loading mode
useDropdown
Shows icons.ChevronDownSIcon on the right side
b24ui
{ base?: SlotClass; baseLoading?: SlotClass; baseLoadingWaitIcon?: SlotClass; baseLoadingClockIcon?: SlotClass; baseLoadingSpinnerIcon?: SlotClass; baseLine?: SlotClass; label?: SlotClass; labelInner?: SlotClass; leadingIcon?: SlotClass; leadingAvatar?: SlotClass; leadingAvatarSize?: SlotClass; trailingIcon?: SlotClass; safeList?: SlotClass; }
<button>
ColorModeAvatar
An Avatar that automatically switches its image based on the current theme (light/dark).
ColorModeImage
An image element with a different source for light and dark mode.
On this page