Add size prop to FAB
See original GitHub issueDescription. It is much difficult and an overwork to add custom styles to FAB especially when it comes to size of the FAB which doesn’t work as expected.
Solution
Solution which i recommend: There should be a prop size
where we can change the overall size of the fab as the default size is too big for some cases and small
doesn’t work with label.
The size
prop should change everything inside the FAB including padding, fontSize of label etc.
Alternatives
We can achieve a similar thing by building our own component using TouchableOpacity
etc and setting styles manually.
Link to snack
"react-native": "0.64.3",
"react-native-paper": "4.11.1",
"react-native-vector-icons": "^9.0.0",
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Fab API - Material UI - MUI
API reference docs for the React Fab component. Learn about the props, CSS, and other APIs of this exported module.
Read more >Floating Action Button: Is there a straightforward way to make ...
The proper way to change the size of a FAB button is using the size prop. size = {'small' | 'medium' | 'large'}....
Read more >Sizing Icons | Font Awesome Docs
Set up with Font Awesome in your project. Familiar with the basics of adding Font Awesome icons. By default, icons inherit the font-size...
Read more >FAB · React Native Paper
FAB. A floating action button represents the primary action in an application. ... Deprecated in v.3x - use prop size="small". Type: boolean. Whether...
Read more >React Icons with Bootstrap - examples & tutorial
To increase icon sizes relative to their container, use size prop with xs , sm , lg (33% increase), or use literal sizes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Already verified. This issue still exists after updating to latest versions.
I can take this task