import {Button} from '@primer/react-brand'
Examples
Default
This is the default variant for the Button component. It corresponds to the secondary
variant appearance.
Primary
The primary
variant of Button indicates that the action is of high priority, and should be used sparingly.
Subtle
The subtle
variant of Button indicates that the action is a low priority one.
Sizes
Block
Removing the arrow
The animated arrow indicator can be removed using the hasArrow
prop.
Using an icon
You can place an icon inside the Button in either the leading or the trailing position to enhance the visual context. It is recommended to use an Octicon here.
Animation
You can place an icon inside the Button in either the leading or the trailing position to enhance the visual context. It is recommended to use an Octicon here.
Polymorphism
The Button
component can render as a button
or a
HTML element. By default, it will render as a button
.
Inline
Component props
Label
Name | Type | Default | Description |
---|---|---|---|
propOne | ReactElement | undefined | Description of my prop |
propTwo | 'single' , 2 | undefined | Description of my prop |