Skip to content
/ Neon Public

NeonText is a SwiftUI component that renders text with a neon-like animated effect.

License

Notifications You must be signed in to change notification settings

ThangKM/Neon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neon

NeonText is a SwiftUI component that renders text with a neon-like animated effect.

Overview

NeonText is a SwiftUI component that renders text with a neon-like animated effect. It provides customization options for font, stroke width, colors, animation, and more.

NeonText Animation

NeonText Animation

Example

NeonText("Neon", animated: $animated)
        .neonText(dash: [3, 5])
        .neonText(lineWidth: 5)
        .neonText(duration: 5)
        .neonText(trim: .init(from: 0.5, to: 0.5))

Configuration

NeonText uses the following environment values for customization:

  • font: The font used for the text
  • lineWidth: The width of the stroke.
  • colors: The gradient colors for the stroke.
  • dash: The dash pattern for the stroke.
  • duration: The animation duration.
  • trim: The trim range for the stroke.
  • dashPhase: The phase offset for the dash pattern.
  • autoreverses: Whether the animation should autoreverse.

📃 License

Neon is released under an MIT license. See License.md for more information.

About

NeonText is a SwiftUI component that renders text with a neon-like animated effect.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages