Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@axa-ch/button
Advanced tools
Buttons provide a clickable element, which can be used in forms, or anywhere else where simple, standard call-to-action functionality is needed. They may display text, icons, or both. Buttons can be styled via several properties to change their look-and-feel. If you need a link with button styling, use axa-button-link instead.
Important: If this component needs to run in Internet Explorer 11, you need to use our polyfill.
npm install @axa-ch/button
import '@axa-ch/button';
...
<axa-button>I am a button</axa-button>
Create a React-ified button with the createElement function from your React version and then use it like this:
import { createElement } from 'react';
import createAXAButtonReact from '@axa-ch/button/lib/index.react';
const AXAButtonReact = createAXAButtonReact(createElement);
export default AXAButtonReact;
<AXAButtonReact motionOff onClick={handler}>
I am a Button
</AxaButtonReact>
Import the button-defining script and use a button like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Your awesome title</title>
</head>
<body>
<axa-button>I am a button</axa-button>
<script src="node_modules/@axa-ch/button/dist/index.js"></script>
</body>
</html>
Attribute | Details |
---|---|
variant="secondary" | Button in a ghost state |
variant="red" | Button red |
variant="inverted" | Button inverted |
variant="inverted-blue-ocean" | Button inverted blue ocean |
variant="inverted-red-tosca" | Button inverted red tosca |
variant="inverted-purple-logan" | Button inverted purple logan |
variant="inverted-green-viridian" | Button inverted green viridian |
variant="inverted-blue-teal" | Button inverted inverted blue teal |
Attribute | Details |
---|---|
type="button" | Default button type (default if omitted) |
type="submit" | Submit button submit for forms |
type="reset" | Reset button for forms |
Attribute | Details |
---|---|
size="" | Default button medium size |
size="small" | button small size |
size="large" | button large size |
The Boolean attribute motionoff
deactivates hover animation.
The Boolean attribute disabled
disables the button natively.
Based on the string-valued attribute icon
, interpreted as icon name, an icon will be rendered. To see the full list of possible icons, see the axa-icon README.
The function-valued attribute onClick
can be used as a callback prop for React and other frameworks.
With this string attribute you can set a CSS class to the component.
FAQs
The button component for the AXA Pattern Library
The npm package @axa-ch/button receives a total of 0 weekly downloads. As such, @axa-ch/button popularity was classified as not popular.
We found that @axa-ch/button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 49 open source maintainers collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.