Skip to main content

Icon Button

Icon buttons are used to trigger actions with an icon.

https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=23132-166001

Demo

zeta-web v1.4.2
Web Components

Storybook

https://design.zebra.com/web/storybook/?path=/docs/components-buttons--docs

Slots

NameDescriptionType
defaultThe name of the icon. Full list of icons can be found at Zeta Icons.ZetaIconName

Inherited Attributes

NameDescriptionTypeDefaultInherited From
flavorFlavor of component.Values:* primary - blue background.* positive - green background.* negative - red background.* outline - primary outline only.* outline-subtle - grey outline only.* text - primary text only.* inverse - black/white background. Note that this flavor is not supported in all components.* subtle - white background with grey text. Same action colors as 'text' flavor.* custom - custom color background with custom color text/icon.'primary' | 'positive' | 'negative' | 'outline' | 'outline-subtle' | 'text' | 'subtle' | 'custom'"primary"Flavored
leadingIconLeading icon of button. Full list of icons can be found at https://design.zebra.com/iconsZeta Icons.ZetaIconName | nullnull
trailingIconTrailing icon of button. Full list of icons can be found at https://design.zebra.com/iconsZeta Icons.ZetaIconName | nullnull
shapeWhether the component is sharp, rounded or fully rounded.This will change the border radius and icon font.Possible values are: - sharp: No border radius, uses "zeta-icons-sharp"- rounded: Minimal border radius, uses "zeta-icons-round"- full: Full border radius, uses "zeta-icons-round"'sharp' | 'rounded' | 'full'"rounded"BaseButton
sizeSize of componentSizeType"medium"BaseButton
disabledBoolean for if component is disabled.This will apply disabled styles.booleanfalseBaseButton
tabIndexThe tab index of the component, used to determine the order in which elements receive focus when the user navigates through the document by pressing the Tab key.number0BaseButton
typeThe type of the button when used in a form"submit" | "reset" | "button" | undefinedundefinedBaseButton
nameName for the button, used if the button is in a form.string | undefinedundefinedBaseButton
valueThe value of the name property When submitted as part of a formstring | undefinedundefinedBaseButton

CSS Properties

NameDescription
--icon-button-color(Deprecated: Use --button-color instead)
--button-colorThe background color of the button when flavor="custom".
--button-text-colorThe text color of the button when flavor="custom".
--icon-button-icon-colorThe color of the icon when flavor="custom".
--icon-button-icon-color-disabledThe color of the icon when the button is disabled and flavor="custom".
--button-disabled-colorThe background color of the disabled button when flavor="custom".
--button-disabled-text-colorThe text color of the disabled button when flavor="custom".
--button-hover-colorThe background color on hover when flavor="custom" (overrides the default hover filter).
--button-active-colorThe background color on active/press when flavor="custom" (overrides the default press filter).