Skip to content

Commit 1c82f4f

Browse files
authored
Update README.md
1 parent 3b6a734 commit 1c82f4f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ An optional array of numbers defining the location of each gradient color stop,
6767
#### useViewFrame
6868
Optional. If true gradient will be calculated for text view background frame rather than text frame.
6969

70+
```javascript
71+
<LinearTextGradient
72+
numberOfLines={1}
73+
useViewFrame={true}
74+
locations={[0.5, 0.95]}
75+
// note colors like '#FF000000' are used for seamless transition to transparent
76+
colors={['#FF0000', '#FF000000']}
77+
start={{ x: 0, y: 0 }}
78+
end={{ x: 1, y: 0 }}
79+
>
80+
%%%%%%%%%%%%%%%%%%%%%%
81+
</LinearTextGradient>
82+
```
83+
7084
<img src="img/useViewFrame.png" width="300">
7185

7286

0 commit comments

Comments
 (0)