# Crate Options

You can pass custom options to Crate when initializing it, for example:

new Crate({ server: '299881420891881473', location: ['top', 'left'] })
1

# Definitions

Typescript definitions

type url = string
type size = string

export type vertical = 'top' | 'bottom' | number
export type horizontal = 'left' | 'right' | number

interface Options {
  // Server + channel IDs
  server: string
  channel?: string

  // Where the button should appear on-screen
  location?: [vertical, horizontal]

  // The color of the button
  color?: string
  // The glyph to display on the button
  glyph?: [url, size]
  // Custom CSS to be injected into the Shadow root
  css?: string

  // Message notifications
  notifications?: boolean
  // Unread message indicator
  indicator?: boolean
  // Notification timeout
  timeout?: number

  // Only load the widget once the user opens it
  defer?: boolean
  // Connect to a custom WidgetBot server
  shard?: url
}

export default Options
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35