Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ivanvc/bubble-marquee

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ivanvc/bubble-marquee

  • v0.0.0-20231119002927-c9b9135cf1f4
  • Source
  • Go
  • Socket score

Version published
Created
Source

Marquee Bubble

GoDoc

A simple BubbleTea bubble component to generate marquees.

Made with VHS

Usage

First, initialize a new marquee, then set the text to display, and optionally the width. If width is not defined, it's assumed from the text's length.

func NewMyModel() MyModel {
    m := marquee.New()
    m.SetText("Hello World")
    m.SetWidth(100) // optional
    return MyModel{marquee: m}
}

It supports two scrolling directions, left and right.

m.ScrollDirection = marquee.Right

You can also specify the scrolling speed (defaults to 250ms).

m.ScrollSpeed = 50 * time.Millisecond

Then, call scroll in your Init().

func(m MyModel) Init() tea.Cmd {
  return m.marquee.Scroll
}

That's it. Check the documentation and the example directory for more detailed usage.

License

See LICENSE.

FAQs

Package last updated on 19 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc