Last updated

Button

Import

import { Button } from '@redocly/theme/components/Button/Button';

Properties

Prop TypeDescription
childrenReact.ReactNodeContent displayed inside the button.
disabledbooleanDisables the button if true.
blinkingbooleanAdds a blinking effect (useful for drawing attention).
fullWidthbooleanMakes the button stretch to 100% of its container's width.
variantenum (primary | secondary | outlined | text | link | ghost | string)Defines the button's visual style.
toneenum (default | danger)Indicates the tone, e.g., for warnings or critical actions.
sizeenum (small | medium | large | string)Controls the button size.
extraClassstringAdds extra custom CSS classes.
tostringIf provided, renders the button as a link to the specified URL.
iconJSX.ElementAdds an icon to the button.
iconPositionenum (left | right)Sets the icon position relative to the text.
titlestringSets the title (tooltip text) of the button.
tabIndexnumberControls the button's focus order.
onClick(e?: React.MouseEvent<HTMLElement>) => voidFunction to call when the button is clicked.
typeenum (button | submit | reset)Specifies the button type (HTML form behavior).

Resources