Reference
August 1, 2020 ยท View on GitHub
Usage details for .shiny()
Contents
Usage
Just import Shiny and modify your view with .shiny() to get started.
Import Shiny
...
Text("Hello, shiny world! โจ").shiny()
Gradients
The .shiny() view modifier takes a gradient parameter to define the shiny surface. By default, .shiny() uses Gradient.rainbow.
Rainbow
๐ .shiny(.rainbow)
Cycles through the system colors in rainbow order.
Iridescent
๐ .shiny(.iridescent)
Cycles through translucent blues and purples that add an extra sparkle to your views.
Matte
๐จ .shiny(.matte(UIColor))
Generates a matte surface from a given color, modeling a dispersed light source.
Glossy
๐ต .shiny(.glossy(UIColor))
Generates a matte surface from a given color, modeling a focused light source.
Hyper Glossy
๐ฆ .shiny(.hyperGlossy(UIColor))
Generates a matte surface from a given color, modeling an intense light source.
Custom
โ๏ธ .shiny(Gradient(...))
Write your own gradient for a shiny view.