Skip to content

Broadcast

Broadcast automatically fetches broadcast messages for the current (or a given) url.

ElementsdeprecatediOSreleased

Uses toast apis under the hood.

N.B. Broadcast should only be included once per page to avoid duplicate broadcast messages being displayed. The preferred method for including broadcast is to use the broadcast-podlet provided by the communication team.

Example

See the toast component for examples, as broadcast utilizes it to display messages.

Usage

Design Guidelines

See Figma: Warp - Components / Broadcast

Framework(s)

Import

js
import '@warp-ds/elements/components/broadcast';

Syntax

html
<w-broadcast 
  api="https://dev.finn.no/broadcasts"
  url="https:/dev.finn.no/meldinger" interval="30000">
</w-broadcast>

Props

Required props

nametypedefaultnotes

api

string

API endpoint to fetch broadcasts from

Optional Props

nametypedefaultnotes

interval

number

300 000

Refetch interval. Default is set to 5 minutes

url

string

window.location.href

Page (identified by its url) to check for registered broadcasts against

Questions?

Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system