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.
label
activeColor
depth
'normal'
"light" | "dark" | "normal"
Renders nothing on the air-* colours, the default among them: the depth compound variants are keyed on the legacy colour names only.
air-*
activeDepth
Same as depth — no effect on the air-* colours.
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 a dropdown chevron on the right side, from the dictionary's chevronDown role, so an app.config override reaches it.
chevronDown
app.config
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