Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.28 KB

reference.md

File metadata and controls

63 lines (38 loc) · 1.28 KB

Reference

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.