Installations
npm install react-floating-suffix
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
5.9.1
NPM Version
3.8.3
Score
46.8
Supply Chain
93.7
Quality
73.7
Maintenance
50
Vulnerability
99.6
License
Releases
Unable to fetch releases
Love this project? Help keep it running — sponsor us today! 🚀
Download Statistics
Total Downloads
1,349
Last Day
1
Last Week
2
Last Month
16
Last Year
102
Package Meta Information
Latest Version
0.0.2
Package Id
react-floating-suffix@0.0.2
Size
18.99 kB
NPM Version
3.8.3
Node Version
5.9.1
Total Downloads
Cumulative downloads
Total Downloads
1,349
Last Day
0%
1
Compared to previous day
Last Week
-66.7%
2
Compared to previous week
Last Month
220%
16
Compared to previous month
Last Year
32.5%
102
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
react-floating-suffix
:cloud: Don't let that suffix outta sight!
Made with ❤ at @outlandish
Float an extension/suffix/whatevs so that it displays to the right of the content even if the content overflows.
Dude no. 1: "Hey man, you should totally float the suffix so that it never goes out of sight."
Dude no. 2: "Outta sight, dude!"

Install
1npm install react-floating-suffix --save
Import
1// ES2015 2import FloatingSuffix from 'react-floating-suffix'
1// CommonJS 2var FloatingSuffix = require('react-floating-suffix')
Usage
1<FloatingSuffix 2 content="New Text Document" 3 suffix=".txt" 4 5 // all optional 6 style={{ backgroundColor: 'white', color: 'black' }} 7 width='100px' 8 textOverflow="ellipsis" 9/>
Props
content <String|Element>
Required.
The content to append a floating suffix on to.
suffix <String>
Required.
The floating suffix text.
style <Object>
Optional, default: none.
Customise the container with your own CSS styles.
Overrides the textOverflow
and width
properties.
width <String|Number>
Optional, default: '100%'
The width of the container.
When the content is larger than this value minus the width of the suffix, the suffix will stick.
1// Awesome pseudo-code 2const willSuffixFloat = container.width - suffix.width > width
textOverflow <String>
Optional, default: ellipsis
.
Value of the text-overflow
CSS property for the content
.
Contributing
All pull requests and issues welcome!
If you're not sure how, check out Kent C. Dodds' great video tutorials on egghead.io!
Author & License
react-floating-suffix
was created by Sam Gluck and is released under the MIT license.

No vulnerabilities found.

No security vulnerabilities found.