Skip to content

Commit 69ecbcd

Browse files
committed
Add note about vector icons and nano icons to 7.x bottom tabs docs
1 parent 2d2169a commit 69ecbcd

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎versioned_docs/version-7.x/native-bottom-tab-navigator.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,19 @@ The icon can be of following types:
402402

403403
The image is tinted by default. Set `tinted` to `false` if the image has its own colors that you want to preserve.
404404

405+
To use font icons from [React Native Vector Icons](https://github.com/oblador/react-native-vector-icons), [rasterize them into images](https://github.com/oblador/react-native-vector-icons?tab=readme-ov-file#usage-as-png-imagesource-object) with `@react-native-vector-icons/get-image`:
406+
407+
```js
408+
import { Lucide } from '@react-native-vector-icons/lucide';
409+
410+
// ...
411+
412+
tabBarIcon: {
413+
type: 'image',
414+
source: Lucide.getImageSourceSync('heart', 22),
415+
}
416+
```
417+
405418
- [SF Symbols](https://developer.apple.com/sf-symbols/) name - Supported on iOS
406419

407420
```js
@@ -417,6 +430,16 @@ The icon can be of following types:
417430

418431
System symbols use a single color by default.
419432

433+
To use custom SVG files as icons, use [React Native Nano Icons](https://nano-icons.swmansion.com/). Its `nativeNanoSymbol` function returns a custom SF Symbol on iOS and a vector drawable image on Android:
434+
435+
```js
436+
import { nativeNanoSymbol } from 'react-native-nano-icons/symbols';
437+
438+
// ...
439+
440+
tabBarIcon: nativeNanoSymbol('newspaper'),
441+
```
442+
420443
To render different icons for active and inactive states, you can use a function:
421444

422445
```js

0 commit comments

Comments
 (0)