gettingStarted.stories.mdx 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import StylesVariantsComponents from './styles-variants-components.svg';
  2. <Meta title="Getting Started" />
  3. # Getting Started
  4. 👋 Hello there! You've arrived at Sentry's Design System guidebook. Here, you will find a detailed account of our UI system, including interactive examples and recommended use cases. We want to have appropriate and consistent use of our components, so that's why this guidebook exists!
  5. ---
  6. ## Structure
  7. - **`CORE`**: foundational styles that are used throughout the entire UI system, like color, typography,…
  8. - **`ASSETS`**: logos, images, icons,…
  9. - **`COMPONENTS`**: reusable components, with detailed descriptions and recommended use cases
  10. - **`VIEWS`**: layouts and other UI groups that are composed of multiple components
  11. - **`UTILITIES`**: UI-related functions, like text formatters, truncators,…
  12. - **`DEPRECATED`**: legacy components that should no longer be used; they are here for documentation purposes only
  13. ---
  14. ## Usage
  15. Here's how to make the best use of this guide:
  16. - Press `/` to perform a quick search, you can search by category or component name
  17. - When viewing components, check out the `Control`, `Accessibility`, and other useful tabs in the bottom panel
  18. - Play around with features in the top bar, you can:
  19. - Zoom in/out
  20. - Simulate screen sizes
  21. - See what the component looks like for color-blind users
  22. - Ping Vu Luong or someone in the Product Design team if you're not sure about anything related to UI systems
  23. ---
  24. ## Styles, variants, and components
  25. Sentry's UI system has three fundamental building blocks: styles, variants, and components. You will see these concepts mentioned throughout this guide, so it's good to understand what each of them means and how they are different from one another.
  26. **Styles** are specific definitions/assignments for UI attributes, like background color, font size, and border. For example, `background-color: #FFFFFF` is a style.
  27. **Variants** are predefined style combinations. For example, we can define a `primary` variant for buttons that consists of the following styles: `background color: #6C5FC7`, `text color: #FFFFFF`, and `border: 1px #3E2C73`. (Note: we use hard-coded values, like `#6C5FC7`, for demonstration purposes only. We strongly discourage using them in the code. Instead, use predefined variables like `theme.backgroundColor`.)
  28. **Components** are flexible, reusable UI elements such as buttons, dialogs, and badges. A component can adopt one of many variants, and one or more styles. For example, a button can adopt a `primary` or `secondary` variant. It can also use one or more additional styles if the variant definitions are not enough.
  29. <img
  30. src={StylesVariantsComponents}
  31. alt="Diagram with three columns: Styles, Variants, and Components"
  32. />
  33. ---
  34. ## Updates
  35. Check out the Changelog page for the latest updates.
  36. <DocsLinks
  37. links={[
  38. {
  39. img: {
  40. src: require('docs-ui/images/changelog-link-preview.svg'),
  41. alt: 'Outline of list with bullet points',
  42. },
  43. title: 'Changelog',
  44. desc: 'Latest updates to the design and component system',
  45. kind: 'Changelog',
  46. story: 'Page',
  47. },
  48. ]}
  49. />
  50. ---
  51. <h2 className="hide-from-toc">Read on</h2>
  52. Start reading now with these foundational topics.
  53. <DocsLinks
  54. links={[
  55. {
  56. img: {
  57. src: require('docs-ui/images/colors-link-preview.svg'),
  58. alt: 'Various shapes in Sentry colors',
  59. },
  60. title: 'Colors',
  61. kind: 'Core/Colors',
  62. desc: 'Colors and how to apply them in a usable, accessible manner',
  63. story: 'Page',
  64. },
  65. {
  66. img: {
  67. src: require('docs-ui/images/typography-link-preview.svg'),
  68. alt: 'Text sample of characters "A", "z", "0", and "9" with grid lines in the background',
  69. },
  70. title: 'Typography',
  71. desc: 'The type system and text styling rules',
  72. kind: 'Core/Typography',
  73. story: 'Page',
  74. },
  75. {
  76. img: {
  77. src: require('docs-ui/images/icons-link-preview.svg'),
  78. alt: 'Large colorful icons',
  79. },
  80. title: 'Icons',
  81. desc: 'Search for icons and get copiable code snippets',
  82. kind: 'Assets/Icons',
  83. story: 'Page',
  84. },
  85. ]}
  86. />