2025-11-28 11:06:09 +01:00
|
|
|
---
|
|
|
|
|
head:
|
|
|
|
|
- - link
|
|
|
|
|
- rel: canonical
|
2025-11-28 17:22:23 +01:00
|
|
|
href: https://lucide.dev/guide/react/advanced/filled-icons
|
2025-11-28 11:06:09 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Filled Icons
|
|
|
|
|
|
|
|
|
|
Fills are officially not supported.
|
|
|
|
|
However, all SVG properties are available on all icons.
|
|
|
|
|
Fill can still be used and will work fine on certain icons.
|
|
|
|
|
|
|
|
|
|
Example with stars:
|
2025-11-28 17:22:23 +01:00
|
|
|
|
|
|
|
|
```SnackPlayer name=State&ext=js&dependencies=react-native-svg,lucide-react-native
|
|
|
|
|
import React, {useState, useEffect} from 'react';
|
|
|
|
|
import { View, StyleSheet } from 'react-native';
|
|
|
|
|
import { Star, StarHalf } from "lucide-react-native";
|
|
|
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
|
return (
|
|
|
|
|
<View style={styles.container}>
|
|
|
|
|
<View style={styles.starRating}>
|
|
|
|
|
<View style={styles.stars}>
|
|
|
|
|
{ Array.from({ length: 5 }, () => (
|
|
|
|
|
<Star fill="#111" strokeWidth={0} />
|
|
|
|
|
))}
|
|
|
|
|
</View>
|
|
|
|
|
<View style={[styles.stars, styles.rating]}>
|
|
|
|
|
<Star fill="orange" strokeWidth={0} />
|
|
|
|
|
<Star fill="orange" strokeWidth={0} />
|
|
|
|
|
<StarHalf fill="orange" strokeWidth={0} />
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
|
container: {
|
|
|
|
|
height: '100%',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center'
|
|
|
|
|
},
|
|
|
|
|
starRating: {
|
|
|
|
|
position: 'relative',
|
|
|
|
|
},
|
|
|
|
|
stars: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
gap: 4,
|
|
|
|
|
},
|
|
|
|
|
rating: {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
top: 0,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default App;
|
|
|
|
|
```
|
2025-11-28 11:06:09 +01:00
|
|
|
|
|
|
|
|
## Will Lucide have fills in the future?
|
|
|
|
|
|
|
|
|
|
This feature has been requested several times and discussion is happening at [#458](https://github.com/lucide-icons/lucide/discussions/458).
|