Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
react-floating-action-button
Advanced tools
A dead simple React component that works similar to Android's Action Button
npm i --save react-floating-action-button
import React from 'react'
import { Container, Button, Link } from 'react-floating-action-button'
export default const YourAwesomeComponent = () => {
return (
<Container>
<Link href="#"
tooltip="Create note link"
icon="far fa-sticky-note" />
<Link href="#"
tooltip="Add user link"
icon="fas fa-user-plus" />
className="fab-item btn btn-link btn-lg text-white"
<Button
tooltip="The big plus button!"
icon="fas fa-plus"
rotate={true}
onClick={() => alert('FAB Rocks!')} />
</Container>
)
}
NOTE: All components support props.children rendering, which in combination with custom styles, can give You a lot of customization options.
React-floating-action-button also exports two objects: lightColors and darkColors. These objects contain a few preset material colors that You can use when passing custom styles to the components, and help You to keep the overall design concise.
Usage
...
import { Container, Button, lightColors, darkColors } from 'react-floating-action-button'
...
<Container>
<Button
tooltip="The big plus button!"
styles={{backgroundColor: darkColors.lighterRed, color: lightColors.white}}
/>
</Container>
Light Colors
Color name | Hex value |
---|---|
red | #ffcdd2 |
pink | #f8bbd0 |
purple | #e1bee7 |
lightBlue | #81d4fa |
cyan | #80deea |
teal | #80cbc4 |
blue | #bbdefb |
green | #dcedc8 |
yellow | #fff9c4 |
orange | #ffe0b2 |
brown | #d7ccc8 |
grey | #e0e0e0 |
darkerGrey | #bdbdbd |
black | #212121 |
white | #f5f5f5 |
Dark Colors
Color name | Hex value |
---|---|
lighterRed | #f44336 |
red | #c62828 |
pink | #ad1457 |
purple | #6a1b9a |
lightBlue | #01579b |
cyan | #00838f |
teal | #00695c |
blue | #0d47a1 |
green | #1b5e20 |
yellow | #f9a825 |
orange | #e65100 |
brown | #4e342e |
grey | #424242 |
black | #212121 |
white | #fafafa |
FAQs
A simple Android like FAB Component for React
The npm package react-floating-action-button receives a total of 317 weekly downloads. As such, react-floating-action-button popularity was classified as not popular.
We found that react-floating-action-button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.