You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@licuido-ui/ui_fab-button

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@licuido-ui/ui_fab-button

FabButton is a customizable Floating Action Button component for React applications. It allows you to create a floating button with optional speed dial actions that can be triggered by either click or hover events.

0.0.2
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

FabButton

FabButton is a customizable Floating Action Button component for React applications. It allows you to create a floating button with optional speed dial actions that can be triggered by either click or hover events.

Author

  • @author Akila k akila@crayond.co

Story Book Link EmptyPage

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_fab-button

Import component

import { FabButton } from '@licuido-ui/ui_fab-button';

Usage

import { FabButton } from '@licuido-ui/ui_fab-button';

const actionsData = [
  { name: 'Action 1', icon: <IconComponent />, onClick: (position) => handleAction1(position) },
  { name: 'Action 2', icon: <IconComponent />, onClick: (position) => handleAction2(position) },
  // Add more actions as needed.
];

function MyComponent() {
  return (
    <FabButton
      direction='up'
      radius={100}
      semicircle={false}
      actionsData={actionsData}
      isOpen={false}
      variant='clickable'
      onToggle={() => console.log('Speed dial toggled')}
      onMainButtonClick={() => console.log('Main button clicked')}
      openIcon={<OpenIconComponent />}
      closeIcon={<CloseIconComponent />}
    />
  );
}

Image

alt text alt text

Props

NameTypeDefaultDescription
classNamestring''Additional class name to apply to the FabButton component.
sxSxProps{}Custom styles using the Material-UI sx prop.
directionstring'up'The direction in which the speed dial actions will be displayed (left, right, up, down).
radiusnumber100The radius (distance) from the main button to the speed dial actions.
semicirclebooleanfalseIf true, the speed dial actions will be displayed in a semicircle layout.
actionsDataActionData[][]An array of action data objects, each representing a speed dial action.
buttonStyleCSSProperties{}Custom styles for the main button.
actionButtonStyleCSSProperties{}Custom styles for each speed dial action button.
directionStyleCSSProperties{}Custom styles for the FabButton's direction container.
buttonConStyleCSSProperties{}Custom styles for the container of the main button and speed dial actions.
closeIconReactNode<></>The custom React node to be used as the close icon for the speed dial.
isOpenbooleanfalseThe current open/close state of the speed dial.
openIconReactNodeThe custom React node to be used as the open icon for the speed dial.
onToggle() => void() => {}Callback function to handle the open/close state change of the speed dial.
onMainButtonClick() => void() => {}Callback function to handle the click on the main button.
variantstring'clickable'The behavior of the FabButton, can be 'hoverable' or 'clickable'.

FAQs

Package last updated on 08 May 2025

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