
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@axa-fr/react-toolkit-button
Advanced tools
1. [Installation](#installation) 1. [Import](#import) 1. [Simple button](#simple-button) 1. [Button circle](#button-circle) 1. [Button with left icon](#button-with-left-icon) 1. [Button with right icon](#button-with-right-icon) 1. [Disabled Button](#disab
@axa-fr/react-toolkit-buttonnpm i @axa-fr/react-toolkit-button
import SimpleButton from '@axa-fr/react-toolkit-button';
import '@axa-fr/react-toolkit-button/dist/af-button.css';
const Button = () => <SimpleButton>Lorem Ipsum</SimpleButton>;
export default Button;
| Button | classModifier |
|---|---|
| Reverse Button | reverse |
| Disabled Button | disabled |
| Success Button | success |
| Danger Button | danger |
| Small Button | small |
You can see the example below :
const ReverseButton = () => (
<SimpleButton classModifier="reverse">Lorem Ipsum</SimpleButton>
);
export default ReverseButton;
const CircleButton = () => (
<SimpleButton className="af-btn--circle glyphicon glyphicon-floppy-disk" />
);
export default CircleButton;
const LeftIconButton = () => (
<Button classModifier="hasiconLeft">
Lorem Ipsum
<i className="glyphicon glyphicon-arrowthin-left" />
</Button>
);
export default LeftIconButton;
const RightIconButton = () => (
<Button classModifier="hasiconRight">
Lorem Ipsum
<i className="glyphicon glyphicon-arrowthin-right" />
</Button>
);
export default RightIconButton;
For a better accessibility (users to have focus on disabled buttons), you should use the aria-disabled attribute instead of the disabled attribute.
const DisabledButton = () => (
<Button classModifier="disabled" aria-disabled>
Lorem Ipsum
<i className="glyphicon glyphicon-arrowthin-right" />
</Button>
);
export default DisabledButton;
Be careful that using the aria-disabled attribute will not disable the button, so you have to handle the disabled state inside your onClick or onSubmit function.
const disabledButton = true;
<form
onSubmit={event => {
event?.preventDefault();
if (!disabledButton) {
// call function
}
}}>
<Button classModifier="disabled" aria-disabled={disabledButton}>
Lorem Ipsum
<i className="glyphicon glyphicon-arrowthin-right" />
</Button>
</form>
);
export default DisabledButton;
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.