New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@precooked/react-floating-action-button

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@precooked/react-floating-action-button

Componente FAB reutilizable para proyectos React

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-84.62%
Maintainers
0
Weekly downloads
 
Created
Source

FloatingActionButton

Precooked Logo

A versatile floating action button component for React, designed with customization and flexibility in mind. It supports multiple styles, shadows, icon integration, and responsive sizing.

Installation

npm install @precooked/react-floating-action-button

Usage Example

import React from "react";
import FloatingActionButton from "@precooked/react-floating-action-button";

const App = () => {
    const handleClick = () => {
        console.log("Floating Action Button Clicked!");
    };

    return (
        <div>
            <FloatingActionButton
                onClick={handleClick}
                color="primary"
                icon="plus"
                type="solid"
                size="md"
                hasShadow={true}
            />
        </div>
    );
};

export default App;

Props

PropTypeDescriptionDefault
onClick() => voidCallback function triggered when the button is clicked.undefined
colorkeyof colors | stringDefines the button color. Accepts predefined color keys or custom hex codes."primary"
borderRadiusnumberSets the border radius of the button.999
type"clear" | "outline" | "solid"Defines the button style."solid"
disabledbooleanDisables the button if set to true.false
iconstringThe name of the icon to display.undefined
iconPathsstring[]Custom SVG paths for the icon.undefined
iconSizenumberSize of the icon in pixels.Calculated
hasShadowbooleanDetermines whether the button has a shadow.true
styleReact.CSSPropertiesAdditional custom styles for the button.{}
size"xs" | "sm" | "md" | "lg" | "xl"Sets the size of the button, adjusting padding and icon size."md"

Features

  • Supports multiple styles: solid, outline, and clear.
  • Customizable shadow and border radius.
  • Dynamic icon support, including custom SVG paths.
  • Responsive sizing options (xs, sm, md, lg, xl).
  • Lightweight and easy to integrate.

Contributing

Feel free to submit issues or feature requests in the GitHub repository.

License

MIT

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc