Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
abaabil.button
Advanced tools
[![npm version](https://img.shields.io/npm/v/abaabil.button.svg)](https://www.npmjs.com/package/abaabil.button) [![npm downloads](https://img.shields.io/npm/dm/abaabil.button.svg)](https://www.npmjs.com/package/abaabil.button)
The Button
component is a versatile and customizable button component built with React. It supports different variants, sizes, icons, and states, making it suitable for a wide range of use cases.
The Button
component is used to display buttons in your application. This documentation provides instructions on how to use the Button
component in your React projects. The Button
component is a part of the abaabil.button
library.
You can import the Button
component from the abaabil
package or directly from the abaabil.button
package.
import { Button } from 'abaabil';
// or
import Button from 'abaabil.button';
The Button
component can be used in your JSX to display buttons with various properties. You can customize the button by setting its properties such as icon
, actionIcon
, variant
, size
, disabled
, outlined
, and className
.
import * as React from 'react';
import Button from 'abaabil.button';
const App = () => (
<div>
<Button variant="primary" size="base">Primary Button</Button>
<Button variant="secondary" size="lg" icon="settings">Secondary Button</Button>
<Button variant="success" size="sm" actionIcon="check" fullWidth>Success Button</Button>
<Button variant="error" outlined>Outlined Error Button</Button>
<Button variant="tertiary" disabled>Tertiary Disabled Button</Button>
</div>
);
export default App;
import * as React from 'react';
import Button from 'abaabil.button';
const FilledVariantsExample = () => (
<div className="flex flex-wrap gap-4">
<Button icon="photo">Primary</Button>
<Button variant="secondary" icon="photo">Secondary</Button>
<Button variant="tertiary" icon="photo">Tertiary</Button>
<Button variant="success" icon="photo">Success</Button>
<Button variant="error" icon="photo">Error</Button>
</div>
);
export default FilledVariantsExample;
import * as React from 'react';
import Button from 'abaabil.button';
const DisabledFilledVariantsExample = () => (
<div className="flex flex-wrap gap-4">
<Button icon="photo" disabled>Primary</Button>
<Button variant="secondary" icon="photo" disabled>Secondary</Button>
<Button variant="tertiary" icon="photo" disabled>Tertiary</Button>
<Button variant="success" icon="photo" disabled>Success</Button>
<Button variant="error" icon="photo" disabled>Error</Button>
</div>
);
export default DisabledFilledVariantsExample;
import * as React from 'react';
import Button from 'abaabil.button';
const OutlinedVariantsExample = () => (
<div className="flex flex-wrap gap-4">
<Button icon="photo" outlined>Primary</Button>
<Button variant="secondary" icon="photo" outlined>Secondary</Button>
<Button variant="tertiary" icon="photo" outlined>Tertiary</Button>
<Button variant="success" icon="photo" outlined>Success</Button>
<Button variant="error" icon="photo" outlined>Error</Button>
</div>
);
export default OutlinedVariantsExample;
import * as React from 'react';
import Button from 'abaabil.button';
const DisabledOutlinedVariantsExample = () => (
<div className="flex flex-wrap gap-4">
<Button icon="photo" outlined disabled>Primary</Button>
<Button variant="secondary" icon="photo" outlined disabled>Secondary</Button>
<Button variant="tertiary" icon="photo" outlined disabled>Tertiary</Button>
<Button variant="success" icon="photo" outlined disabled>Success</Button>
<Button variant="error" icon="photo" outlined disabled>Error</Button>
</div>
);
export default DisabledOutlinedVariantsExample;
import * as React from 'react';
import Button from 'abaabil.button';
const ButtonSizesExample = () => (
<div className="flex flex-wrap gap-4">
<Button size="sm" icon="photo">Small</Button>
<Button icon="photo">Base</Button>
<Button size="lg" icon="photo">Large</Button>
</div>
);
export default ButtonSizesExample;
Prop | Type | Default | Description |
---|---|---|---|
as | string | button | The HTML element or React component to render. |
icon | string | null | Icon to display in the button. Uses the Icon component. |
actionIcon | string | null | Icon to display on the right side of the button. Uses the Icon component. |
variant | string | primary | The button variant. Can be primary , secondary , tertiary , success , or error . |
size | string | base | The size of the button. Can be sm , base , or lg . |
disabled | boolean | false | Whether the button is disabled. |
outlined | boolean | false | Whether the button is outlined. |
children | node | null | The content of the button. |
isPressed | boolean | false | The pressed state of the button. |
className | string | '' | Additional class names to apply to the button. |
fullWidth | boolean | false | Whether the button should take the full width of its container. |
rounded | boolean | false | Whether the button should have rounded corners. |
...props | object | {} | Additional props to pass to the button. |
disabled
prop applied. Can be combined with outlined
for different styles.outlined
prop applied.Icon
component.Icon
component.import * as React from 'react';
import Button from 'abaabil.button';
const Example = () => (
<div>
<Button variant="primary" size="base">Primary Button</Button>
<Button variant="secondary" size="lg" icon="settings">Secondary Button</Button>
<Button variant="success" size="sm" actionIcon="check" fullWidth>Success Button</Button>
<Button variant="error" outlined>Outlined Error Button</Button>
<Button variant="tertiary" disabled>Tertiary Disabled Button</Button>
</div>
);
export default Example;
This example demonstrates various ways to use the Button
component, showcasing different variants, sizes, icons, and states.
FAQs
Unknown package
The npm package abaabil.button receives a total of 2 weekly downloads. As such, abaabil.button popularity was classified as not popular.
We found that abaabil.button demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.