config/Options/common/title.ts

  1. /**
  2. * Copyright (c) 2017 ~ present NAVER Corp.
  3. * billboard.js project is licensed under the MIT license
  4. */
  5. /**
  6. * title config options
  7. */
  8. export default {
  9. /**
  10. * Set title options
  11. * @name title
  12. * @memberof Options
  13. * @type {object}
  14. * @property {object} title Title object
  15. * @property {string} [title.text] Title text. If contains `\n`, it's used as line break allowing multiline title.
  16. * @property {number} [title.padding.top=0] Top padding value.
  17. * @property {number} [title.padding.right=0] Right padding value.
  18. * @property {number} [title.padding.bottom=0] Bottom padding value.
  19. * @property {number} [title.padding.left=0] Left padding value.
  20. * @property {string} [title.position=center] Available values are: 'center', 'right' and 'left'.
  21. * @see [Demo](https://naver.github.io/billboard.js/demo/#Title.MultilinedTitle)
  22. * @example
  23. * title: {
  24. * text: "Title Text",
  25. *
  26. * // or Multiline title text
  27. * text: "Main title text\nSub title text",
  28. *
  29. * padding: {
  30. * top: 10,
  31. * right: 10,
  32. * bottom: 10,
  33. * left: 10
  34. * },
  35. * position: "center"
  36. * }
  37. */
  38. title_text: <string | undefined>undefined,
  39. title_padding: {
  40. top: 0,
  41. right: 0,
  42. bottom: 0,
  43. left: 0
  44. },
  45. title_position: <"center" | "right" | "left">"center"
  46. };