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.