@quenty/snackbar

11.3.0 • Public • Published

Snackbar

Snackbars provide lightweight feedback on an operation at the base of the screen. They automatically disappear after a timeout or user interaction. There can only be one on the screen at a time.

Installation

npm install @quenty/snackbar --save

Usage

Using the snackbar should be done via the SnackbarManager, which ensures only one snackbar can be visible at a time.

-- Client script

require("SnackbarManager"):Init(screenGui)

-- Sometime later on the client

require("SnackbarManager"):MakeSnackbar("Hello world!")

SnackbarManager API

Usage is designed to be simple.

SnackbarManager:Init(screenGui)

SnackbarManager:WithScreenGui(screenGui)

Sets the screenGui to use

SnackbarManager:MakeSnackbar(text, options)

DraggableSnackbar API

Usage is designed to be simple.

DraggableSnackbar.new(Parent, Text, GCOnDismissal, Options)

Note that this will not show until :Show() is called

DraggableSnackbar:Show()

DraggableSnackbar:StartTrack(X, Y)

DraggableSnackbar:Track()

DraggableSnackbar:GetOffsetXY()

DraggableSnackbar:EndTrack()

DraggableSnackbar:Dismiss()

DraggableSnackbar:IsVisible()

DraggableSnackbar:Destroy()

Snackbar API

Snackbar.new(Parent, Text, options)

Snackbar:Dismiss()

Snackbar:SetBackgroundTransparency(Transparency)

Snackbar:FadeOutTransparency(PercentFaded)

Snackbar:FadeInTransparency(PercentFaded)

Will animate unless given PercentFaded

Snackbar:FadeHandler(NewPosition, DoNotAnimate, IsFadingOut)

Snackbar:FadeOutUp(DoNotAnimate)

Snackbar:FadeOutDown(DoNotAnimate)

Snackbar:FadeOutRight(DoNotAnimate)

Snackbar:FadeOutLeft(DoNotAnimate)

Snackbar:FadeIn(DoNotAnimate)

Package Sidebar

Install

npm i @quenty/snackbar

Weekly Downloads

291

Version

11.3.0

License

MIT

Unpacked Size

30.5 kB

Total Files

9

Last publish

Collaborators

  • quenty