slidev-theme-neversink 0.3.6 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.vscode/settings.json +4 -1
  2. package/README.md +5 -5
  3. package/components/Admonition.vue +13 -3
  4. package/components/CreditScroll.vue +16 -21
  5. package/components/StickyNote.vue +23 -10
  6. package/docs/.vitepress/config.js +1 -0
  7. package/docs/components/admonitions.md +25 -10
  8. package/docs/components/arrowdraw.md +2 -2
  9. package/docs/components/arrowheads.md +4 -4
  10. package/docs/components/box.md +10 -10
  11. package/docs/components/creditscroll.md +34 -0
  12. package/docs/components/email.md +1 -1
  13. package/docs/components/kawaii.md +1 -1
  14. package/docs/components/line.md +2 -2
  15. package/docs/components/qrcode.md +2 -2
  16. package/docs/components/speechbubble.md +8 -8
  17. package/docs/components/stickynote.md +42 -7
  18. package/docs/components/thumb.md +6 -6
  19. package/docs/dark-mode.md +134 -0
  20. package/docs/getting-started.md +1 -0
  21. package/docs/layouts/credits.md +1 -1
  22. package/docs/public/screenshots/1.png +0 -0
  23. package/docs/public/screenshots/10.png +0 -0
  24. package/docs/public/screenshots/11.png +0 -0
  25. package/docs/public/screenshots/12.png +0 -0
  26. package/docs/public/screenshots/13.png +0 -0
  27. package/docs/public/screenshots/14.png +0 -0
  28. package/docs/public/screenshots/15.png +0 -0
  29. package/docs/public/screenshots/16.png +0 -0
  30. package/docs/public/screenshots/17.png +0 -0
  31. package/docs/public/screenshots/18.png +0 -0
  32. package/docs/public/screenshots/19.png +0 -0
  33. package/docs/public/screenshots/2.png +0 -0
  34. package/docs/public/screenshots/20.png +0 -0
  35. package/docs/public/screenshots/21.png +0 -0
  36. package/docs/public/screenshots/22.png +0 -0
  37. package/docs/public/screenshots/23.png +0 -0
  38. package/docs/public/screenshots/24.png +0 -0
  39. package/docs/public/screenshots/25.png +0 -0
  40. package/docs/public/screenshots/26.png +0 -0
  41. package/docs/public/screenshots/27.png +0 -0
  42. package/docs/public/screenshots/28.png +0 -0
  43. package/docs/public/screenshots/29.png +0 -0
  44. package/docs/public/screenshots/3.png +0 -0
  45. package/docs/public/screenshots/30.png +0 -0
  46. package/docs/public/screenshots/31.png +0 -0
  47. package/docs/public/screenshots/32.png +0 -0
  48. package/docs/public/screenshots/33.png +0 -0
  49. package/docs/public/screenshots/34.png +0 -0
  50. package/docs/public/screenshots/35.png +0 -0
  51. package/docs/public/screenshots/36.png +0 -0
  52. package/docs/public/screenshots/37.png +0 -0
  53. package/docs/public/screenshots/38.png +0 -0
  54. package/docs/public/screenshots/39.png +0 -0
  55. package/docs/public/screenshots/4.png +0 -0
  56. package/docs/public/screenshots/40.png +0 -0
  57. package/docs/public/screenshots/41.png +0 -0
  58. package/docs/public/screenshots/42.png +0 -0
  59. package/docs/public/screenshots/5.png +0 -0
  60. package/docs/public/screenshots/6.png +0 -0
  61. package/docs/public/screenshots/7.png +0 -0
  62. package/docs/public/screenshots/8.png +0 -0
  63. package/docs/public/screenshots/9.png +0 -0
  64. package/docs/styling.md +97 -1
  65. package/example.md +127 -7
  66. package/layoutHelper.ts +13 -0
  67. package/layouts/default.vue +9 -1
  68. package/layouts/full.vue +10 -6
  69. package/layouts/section.vue +9 -1
  70. package/layouts/side-title.vue +12 -5
  71. package/layouts/top-title-two-cols.vue +10 -3
  72. package/layouts/top-title.vue +10 -3
  73. package/layouts/two-cols-title.vue +9 -2
  74. package/package.json +18 -16
  75. package/screenshot.md +89 -1
  76. package/styles/base.css +12 -5
  77. package/styles/dark-mode.css +785 -0
  78. package/styles/index.ts +1 -0
  79. package/styles/neversink-c.css +26 -0
  80. package/uno.config.ts +3 -0
@@ -1,4 +1,7 @@
1
1
  {
2
2
  "slidev.force-enabled": true,
3
- "slidev.include": ["**/slides.md", "example.md", "screenshot.md"]
3
+ "slidev.include": ["**/slides.md", "example.md", "screenshot.md"],
4
+ "[markdown]": {
5
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
6
+ }
4
7
  }
package/README.md CHANGED
@@ -24,11 +24,11 @@ theme: neversink
24
24
 
25
25
  ## Features
26
26
 
27
- - [Color schemes](colors.md) - the color schemes available in Neversink
28
- - [Custom layouts](layouts.md) - the custom slide layouts available in Neversink
29
- - [Branding](branding.md) - how to customize the theme to your brand/logos
30
- - [Components](components.md) - the custom components such as sticky notes and admonitions
31
- - [Markdown features](markdown.md) - special addons to the Slidev markdown syntax
27
+ - [Color schemes](https://gureckis.github.io/slidev-theme-neversink/colors) - the color schemes available in Neversink
28
+ - [Custom layouts](https://gureckis.github.io/slidev-theme-neversink/layouts) - the custom slide layouts available in Neversink
29
+ - [Branding](https://gureckis.github.io/slidev-theme-neversink/branding) - how to customize the theme to your brand/logos
30
+ - [Components](https://gureckis.github.io/slidev-theme-neversink/components) - the custom components such as sticky notes and admonitions
31
+ - [Markdown features](https://gureckis.github.io/slidev-theme-neversink/markdown) - special addons to the Slidev markdown syntax
32
32
 
33
33
  ## Examples
34
34
 
@@ -18,6 +18,16 @@ const props = defineProps({
18
18
  type: String,
19
19
  default: '100%',
20
20
  },
21
+ custom: {
22
+ // add a custom class if you want
23
+ type: String,
24
+ default: '',
25
+ },
26
+ customTitle: {
27
+ // add a custom class if you want
28
+ type: String,
29
+ default: '',
30
+ },
21
31
  })
22
32
 
23
33
  const colorscheme = computed(() => {
@@ -27,10 +37,10 @@ const colorscheme = computed(() => {
27
37
 
28
38
  <template>
29
39
  <div class="markdown-alert markdown-alert-custom" :class="colorscheme">
30
- <p class="markdown-alert-title-custom">
31
- <span class="font-size-1.3rem"><Icon :icon="props.icon" /></span>&nbsp;&nbsp;{{ props.title }}
40
+ <p class="markdown-alert-title-custom" :class="props.customTitle">
41
+ <span :class="`[font-size-1.3rem, customTitle]`"><Icon :icon="props.icon" /></span>&nbsp;&nbsp;{{ props.title }}
32
42
  </p>
33
- <p><slot></slot></p>
43
+ <p :class="props.custom"><slot></slot></p>
34
44
  </div>
35
45
  </template>
36
46
 
@@ -5,25 +5,26 @@ import { onSlideEnter, useSlideContext } from '@slidev/client'
5
5
  const { $renderContext } = useSlideContext()
6
6
  const props = defineProps({
7
7
  speed: {
8
+ type: Number,
8
9
  default: 0.5,
9
10
  },
10
11
  loop: {
12
+ type: Boolean,
11
13
  default: false,
12
14
  },
13
15
  })
14
16
 
15
17
  const containerRef = ref(null)
16
18
  const scrollPosition = ref(0)
17
- const isScrolling = ref(false)
18
19
 
19
20
  let animationFrameId = null
20
21
 
21
22
  const scroll = () => {
22
23
  scrollPosition.value -= props.speed
23
24
  if (Math.abs(scrollPosition.value) >= 550) {
24
- if (props.loop.value) {
25
- console.log('resetting loop', props.loop.value)
25
+ if (props.loop) {
26
26
  resetScroll()
27
+ animationFrameId = requestAnimationFrame(scroll)
27
28
  } else {
28
29
  stopScrolling()
29
30
  return
@@ -40,34 +41,29 @@ const startScrolling = () => {
40
41
  const stopScrolling = () => {
41
42
  if (animationFrameId) {
42
43
  cancelAnimationFrame(animationFrameId)
44
+ animationFrameId = null
43
45
  }
44
46
  }
45
47
 
46
48
  const resetScroll = () => {
47
- scrollPosition.value = 480 //containerRef.value.offsetHeight * 2.5
49
+ scrollPosition.value = 480
48
50
  if (animationFrameId) {
49
51
  cancelAnimationFrame(animationFrameId)
52
+ animationFrameId = null
50
53
  }
51
54
  }
52
55
 
53
- onMounted(() => {
54
- console.log('mounted')
55
- // Reset scrolling when entering the slide
56
- onSlideEnter(() => {
57
- console.log('context ', $renderContext.value)
58
- if (['slide', 'presenter'].includes($renderContext.value)) {
59
- console.log('onSlideEnter')
60
- resetScroll()
61
- console.log('starting scrolling')
62
- startScrolling()
63
- }
64
- })
56
+ // Must be called in setup scope
57
+ onSlideEnter(() => {
58
+ if (['slide', 'presenter'].includes($renderContext.value)) {
59
+ stopScrolling()
60
+ resetScroll()
61
+ startScrolling()
62
+ }
65
63
  })
66
64
 
67
65
  onUnmounted(() => {
68
- if (animationFrameId) {
69
- cancelAnimationFrame(animationFrameId)
70
- }
66
+ stopScrolling()
71
67
  })
72
68
  </script>
73
69
 
@@ -81,10 +77,9 @@ onUnmounted(() => {
81
77
 
82
78
  <style scoped>
83
79
  .scroll-container {
84
- height: 100vh; /* Use full viewport height */
80
+ height: 100vh;
85
81
  overflow: hidden;
86
82
  position: relative;
87
- cursor: pointer;
88
83
  }
89
84
 
90
85
  .scroll-content {
@@ -18,6 +18,26 @@ const props = defineProps({
18
18
  type: String,
19
19
  default: '',
20
20
  },
21
+ custom: {
22
+ // add a custom class if you want
23
+ type: String,
24
+ default: '',
25
+ },
26
+ customTitle: {
27
+ // add a custom class if you want
28
+ type: String,
29
+ default: 'block text-xs font-mono tracking-normal font-bold',
30
+ },
31
+ devOnly: {
32
+ // only show in dev mode (useful for notes that shouldn't appear in exports)
33
+ type: Boolean,
34
+ default: false,
35
+ },
36
+ })
37
+
38
+ const isVisible = computed(() => {
39
+ if (!props.devOnly) return true
40
+ return import.meta.env.DEV
21
41
  })
22
42
 
23
43
  const colorscheme = computed(() => {
@@ -38,11 +58,11 @@ const stickyStyles = computed(() => ({
38
58
  </script>
39
59
 
40
60
  <template>
41
- <div :class="stickyClasses" :style="stickyStyles">
61
+ <div v-if="isVisible" :class="stickyClasses" :style="stickyStyles">
42
62
  <template v-if="props.title !== ''"
43
- ><strong>{{ props.title }}</strong></template
63
+ ><span :class="props.customTitle">{{ props.title }}</span></template
44
64
  >
45
- <slot></slot>
65
+ <div :class="props.custom"><slot></slot></div>
46
66
  </div>
47
67
  </template>
48
68
 
@@ -61,11 +81,4 @@ const stickyStyles = computed(() => ({
61
81
  color: var(--text-color);
62
82
  border: 0.4px solid var(--border-color);
63
83
  }
64
- .sticky-note strong {
65
- display: block;
66
- font-size: 0.8rem;
67
- font-family: monospace;
68
- letter-spacing: 0em;
69
- word-spacing: -0.3em;
70
- }
71
84
  </style>
@@ -28,6 +28,7 @@ export default defineConfig({
28
28
  { text: 'Getting Started', link: '/getting-started' },
29
29
  { text: 'Markdown Features', link: '/markdown' },
30
30
  { text: 'Colors Schemes', link: '/colors' },
31
+ { text: 'Dark Mode', link: '/dark-mode' },
31
32
  { text: 'Styling', link: '/styling' },
32
33
  { text: 'Branding', link: '/branding' },
33
34
  {
@@ -16,11 +16,13 @@ The `Admonition` component is used to create a colored box with an icon and a ti
16
16
  - `color` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `amber-light`.
17
17
  - `width` (optional) the width of the admonition. Default is `100%`.
18
18
  - `icon` (optional) the icon to display. Default is `mdi-information-variant-circle-outline`.
19
+ - `custom` (optional) a custom CSS class to apply to the admonition content. Default is empty.
20
+ - `customTitle` (optional) a custom CSS class to apply to the admonition title. Default is empty.
19
21
 
20
22
  Example:
21
23
 
22
- ```md
23
- <Admonition title="Info" color='teal-light' width="300px">
24
+ ```vue
25
+ <Admonition title="Info" color="teal-light" width="300px">
24
26
  This is my admonition content.
25
27
  </Admonition>
26
28
  ```
@@ -30,10 +32,23 @@ Renders as:
30
32
  This is my admonition content.
31
33
  </Admonition>
32
34
 
35
+ You can also add custom CSS classes to style the admonition content and title:
36
+
37
+ ```vue
38
+ <Admonition title="Custom Styled" color="purple-light" custom="text-lg font-bold" customTitle="text-red-500">
39
+ This content has custom styling applied.
40
+ </Admonition>
41
+ ```
42
+
43
+ Renders as:
44
+ <Admonition title="Custom Styled" color='purple-light' custom="text-lg font-bold" customTitle="text-red-500">
45
+ This content has custom styling applied.
46
+ </Admonition>
47
+
33
48
  If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`):
34
49
 
35
- ```md
36
- <Admonition title="V-draggable" color='teal-light' width="300px" v-drag>
50
+ ```vue
51
+ <Admonition title="V-draggable" color="teal-light" width="300px" v-drag>
37
52
  This is my admonition content.
38
53
  </Admonition>
39
54
  ```
@@ -47,7 +62,7 @@ The `AdmonitionType` component is used to create a colored box with an icon and
47
62
 
48
63
  Example:
49
64
 
50
- ```md
65
+ ```vue
51
66
  <AdmonitionType type="info" width="300px">
52
67
  This is my info
53
68
  </AdmonitionType>
@@ -57,7 +72,7 @@ This is my info
57
72
  This is my warning
58
73
  </AdmonitionType>
59
74
 
60
- ```md
75
+ ```vue
61
76
  <AdmonitionType type="important" width="300px">
62
77
  This is my important
63
78
  </AdmonitionType>
@@ -67,7 +82,7 @@ This is my important
67
82
  This is my important
68
83
  </AdmonitionType>
69
84
 
70
- ```md
85
+ ```vue
71
86
  <AdmonitionType type="tip" width="300px">
72
87
  This is my tip
73
88
  </AdmonitionType>
@@ -77,7 +92,7 @@ This is my tip
77
92
  This is my tip
78
93
  </AdmonitionType>
79
94
 
80
- ```md
95
+ ```vue
81
96
  <AdmonitionType type="warning" width="300px">
82
97
  This is mywarning
83
98
  </AdmonitionType>
@@ -87,7 +102,7 @@ This is mywarning
87
102
  This is my warning
88
103
  </AdmonitionType>
89
104
 
90
- ```md
105
+ ```vue
91
106
  <AdmonitionType type="caution" width="300px">
92
107
  This is my caution
93
108
  </AdmonitionType>
@@ -99,7 +114,7 @@ This is my caution
99
114
 
100
115
  If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`)
101
116
 
102
- ```md
117
+ ```vue
103
118
  <AdmonitionType type="warning" width="300px" v-drag>
104
119
  This is my my warning
105
120
  </Admonition>
@@ -12,8 +12,8 @@ changed according to the [color schemes](/colors) in the theme. The ArrowDraw co
12
12
  - `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
13
13
  - width (optional) the initial width of the image. Default is 140px
14
14
 
15
- ```md
16
- <ArrowDraw color='red' v-drag/>
15
+ ```vue
16
+ <ArrowDraw color="red" v-drag />
17
17
  ```
18
18
 
19
19
  Renders as:
@@ -11,16 +11,16 @@ The ArrowHeads component has the following props:
11
11
  - `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
12
12
  - width (optional) the initial width of the image. Default is 140px
13
13
 
14
- ```md
15
- <ArrowHeads color='pink' width="300px" v-drag />
14
+ ```vue
15
+ <ArrowHeads color="pink" width="300px" v-drag />
16
16
  ```
17
17
 
18
18
  Renders as:
19
19
 
20
20
  <ArrowHeads color='pink' width="300px"/>
21
21
 
22
- ```md
23
- <ArrowHeads v-drag />
22
+ ```vue
23
+ <ArrowHeads v-drag />
24
24
  ```
25
25
 
26
26
  Renders as:
@@ -13,7 +13,7 @@ The `Box` component is used to just draw a rectangle. It has the following props
13
13
  - `color` (optional) the color of the shape. It uses the color schemes in the theme. The default is 'white' (which means a black border and white fill).
14
14
  - `custom` (optional) any custom classes you want to add to the box. The default is none. For example, opacity only applies to the fill not the border but you can change that using `custom` classes.
15
15
 
16
- ```md
16
+ ```vue
17
17
  <Box v-drag />
18
18
  ```
19
19
 
@@ -25,29 +25,29 @@ well a box, what did you expect.
25
25
 
26
26
  But of course you can customise it:
27
27
 
28
- ```md
29
- <Box shape='r-d-8-0' width='200px' custom='m-10 ' />
28
+ ```vue
29
+ <Box shape="r-d-8-0" width="200px" custom="m-10 " />
30
30
  ```
31
31
 
32
32
  <Box shape='r-d-8-0' width='200px' custom='m-10 ' />
33
33
 
34
- ```md
35
- <Box shape='f-o-5-0' color='sky-light' custom='m-10' />
34
+ ```vue
35
+ <Box shape="f-o-5-0" color="sky-light" custom="m-10" />
36
36
  ```
37
37
 
38
38
  <Box shape='f-o-5-0' color='sky-light' custom='m-10' />
39
39
 
40
40
  more transparent:
41
41
 
42
- ```md
43
- <Box shape='f-o-5-75' color='sky-light' custom='m-10' />
42
+ ```vue
43
+ <Box shape="f-o-5-75" color="sky-light" custom="m-10" />
44
44
  ```
45
45
 
46
46
  <Box shape='f-o-5-75' color='sky-light' custom='m-10' />
47
47
 
48
48
  If can include text as well using a slot
49
49
 
50
- ```md
50
+ ```vue
51
51
  <Box>Hi there</Box>
52
52
  ```
53
53
 
@@ -57,8 +57,8 @@ renders as:
57
57
 
58
58
  You might like to syle it a bit
59
59
 
60
- ```md
61
- <Box custom='pt-10'>Hi there</Box>
60
+ ```vue
61
+ <Box custom="pt-10">Hi there</Box>
62
62
  ```
63
63
 
64
64
  <Box custom='p-10'>Hi there</Box>
@@ -1 +1,35 @@
1
1
  # CreditScroll
2
+
3
+ ## Description
4
+
5
+ The `CreditScroll` component creates a scrolling container similar to movie credits. Content placed inside will automatically scroll upward when the slide is entered. This component is used internally by the [`layout: credits`](/layouts/credits) layout, but can also be used standalone.
6
+
7
+ ## Props
8
+
9
+ - `speed` (optional) controls how fast the content scrolls. Default is `0.5`. Higher numbers scroll faster.
10
+ - `loop` (optional) whether the credits should loop back to the beginning after scrolling completes. Default is `false`.
11
+
12
+ ## Usage
13
+
14
+ The component uses a default slot for content.
15
+
16
+ ```vue
17
+ <CreditScroll speed="1.0" loop>
18
+ <div class="text-center">
19
+ <h2>Credits</h2>
20
+ <p>Person 1</p>
21
+ <p>Person 2</p>
22
+ </div>
23
+ </CreditScroll>
24
+ ```
25
+
26
+ ## Behavior
27
+
28
+ - Scrolling automatically starts when you navigate to the slide
29
+ - Scrolling resets when re-entering the slide
30
+ - If `loop` is `true`, the content will restart from the beginning after completing
31
+ - If `loop` is `false`, scrolling stops when the content has fully scrolled through
32
+
33
+ ## Note
34
+
35
+ For most use cases, it's easier to use the [`layout: credits`](/layouts/credits) layout which wraps this component and provides frontmatter options for `speed` and `loop`.
@@ -10,7 +10,7 @@ The `Email` component formats a email address on (usually) title slides
10
10
 
11
11
  - `v` (required). The email address
12
12
 
13
- ```md
13
+ ```vue
14
14
  <Email v="todd.gureckis@nyu.edu" />
15
15
  ```
16
16
 
@@ -18,7 +18,7 @@ The character options are `IceCream`, `Backpack`, `Cat`, `Browser`, `Mug`, `Plan
18
18
 
19
19
  Example:
20
20
 
21
- ```md
21
+ ```vue
22
22
  <IceCream :size="140" mood="sad" color="#FDA7DC" />
23
23
  ```
24
24
 
@@ -15,8 +15,8 @@ The `Line` component is used to just draw a straight line. It has the following
15
15
  - `width` (optional) the width of the line (default '2')
16
16
  - `color` (optional) the color of the line. Colors can be any of the color schemes. the default is 'black'. The background color of the theme is applied to the stroke of the line so `black` is black line, `red` is red line, `red-light` is a light red line, etc.
17
17
 
18
- ```md
19
- <Line :x1=0 :y1=0 :x2=200 :y2=200 :width=2 color='red' v-drag />
18
+ ```vue
19
+ <Line :x1="0" :y1="0" :x2="200" :y2="200" :width="2" color="red" v-drag />
20
20
  ```
21
21
 
22
22
  Renders as:
@@ -16,8 +16,8 @@ The `Qr` component is used to create QR code in SVG format. The QRCode component
16
16
 
17
17
  Example:
18
18
 
19
- ```md
20
- <QRCode value="https://sli.dev" :size="200" render-as="svg"/>
19
+ ```vue
20
+ <QRCode value="https://sli.dev" :size="200" render-as="svg" />
21
21
  ```
22
22
 
23
23
  Renders as:
@@ -20,8 +20,8 @@ The `SpeechBubble` component is used to create a colored bubble with a speech bu
20
20
 
21
21
  Example:
22
22
 
23
- ```md
24
- <SpeechBubble position="r" color='sky' shape="round" maxWidth="300px">
23
+ ```vue
24
+ <SpeechBubble position="r" color="sky" shape="round" maxWidth="300px">
25
25
 
26
26
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
27
27
  </SpeechBubble>
@@ -33,8 +33,8 @@ Renders as:
33
33
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
34
34
  </SpeechBubble>
35
35
 
36
- ```md
37
- <SpeechBubble position="b" color='sky' shape="round" maxWidth="300px">
36
+ ```vue
37
+ <SpeechBubble position="b" color="sky" shape="round" maxWidth="300px">
38
38
 
39
39
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
40
40
  </SpeechBubble>
@@ -46,8 +46,8 @@ Renders as:
46
46
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
47
47
  </SpeechBubble>
48
48
 
49
- ```md
50
- <SpeechBubble position="t" color='amber' shape="round" maxWidth="300px">
49
+ ```vue
50
+ <SpeechBubble position="t" color="amber" shape="round" maxWidth="300px">
51
51
 
52
52
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
53
53
  </SpeechBubble>
@@ -61,8 +61,8 @@ Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
61
61
 
62
62
  If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the maxWidth to something fixed (e.g., `300px`):
63
63
 
64
- ```md
65
- <SpeechBubble position="t" color='sky' shape="round" maxWidth="300px" v-drag>
64
+ ```vue
65
+ <SpeechBubble position="t" color="sky" shape="round" maxWidth="300px" v-drag>
66
66
 
67
67
  Hello, I'm a **speech bubble**! I'm a longer speech bubble. I'm still going.
68
68
  </SpeechBubble>
@@ -14,13 +14,15 @@ The `StickyNote` component is used to create a colored box with an title and con
14
14
  - `color` (optional) can be any of the [color scheme](/colors) options. If not provided, the default color is `amber-light`.
15
15
  - `width` (optional) the width of the admonition. Default is `180px`.
16
16
  - `textAlign` (optional) the text alignment of the content. Default is `left`.
17
+ - `custom` (optional) a custom CSS class to apply to the sticky note content. Default is empty.
18
+ - `customTitle` (optional) a custom CSS class to apply to the sticky note title. Default is `block text-xs font-mono tracking-normal font-bold`.
19
+ - `devOnly` (optional) when set to `true`, the sticky note will only be visible in development mode and will be hidden in production builds and exports. This is useful for personal notes or reminders that shouldn't appear in the final presentation. Default is `false`.
17
20
 
18
21
  Example:
19
22
 
20
- ```md
23
+ ```vue
21
24
  <StickyNote color="amber-light" textAlign="left" width="180px" title="Title">
22
-
23
- Hello, I'm a **sticky note**.
25
+ Hello, I'm a **sticky note**.
24
26
  </StickyNote>
25
27
  ```
26
28
 
@@ -30,9 +32,28 @@ Renders as:
30
32
  Hello, I'm a **sticky note**.
31
33
  </StickyNote>
32
34
 
35
+ You can also add custom CSS classes to style the sticky note content and title:
36
+
37
+ ```vue
38
+ <StickyNote
39
+ color="teal-light"
40
+ width="200px"
41
+ title="Custom Styled"
42
+ custom="text-lg font-bold text-center"
43
+ customTitle="text-red-500 text-lg"
44
+ >
45
+ This content has custom styling applied.
46
+ </StickyNote>
47
+ ```
48
+
49
+ Renders as:
50
+ <StickyNote color="teal-light" width="200px" title="Custom Styled" custom="text-lg font-bold text-center" customTitle="text-red-500 text-lg">
51
+ This content has custom styling applied.
52
+ </StickyNote>
53
+
33
54
  If you want to position it somewhere arbitrary on the slide add v-drag to the admonition and also set the width to something fixed (e.g., `300px`):
34
55
 
35
- ```md
56
+ ```vue
36
57
  <StickyNote color="amber-light" textAlign="left" width="180px" title="Title" v-drag>
37
58
 
38
59
  Hello, I'm a **sticky note**.
@@ -41,10 +62,9 @@ Hello, I'm a **sticky note**.
41
62
 
42
63
  Another color:
43
64
 
44
- ```md
65
+ ```vue
45
66
  <StickyNote color="pink-light" textAlign="left" width="180px" title="Title">
46
-
47
- Hello, I'm a **sticky note**.
67
+ Hello, I'm a **sticky note**.
48
68
  </StickyNote>
49
69
  ```
50
70
 
@@ -52,3 +72,18 @@ Hello, I'm a **sticky note**.
52
72
 
53
73
  Hello, I'm a **sticky note**.
54
74
  </StickyNote>
75
+
76
+ ## Dev-Only Notes
77
+
78
+ Use the `devOnly` prop to create sticky notes that only appear during development. These are perfect for speaker notes, reminders, or TODOs that you don't want in your exported presentation:
79
+
80
+ ```vue
81
+ <StickyNote color="amber-light" width="180px" title="Note to self" devOnly>
82
+ Remember to add more examples here before the talk!
83
+ </StickyNote>
84
+ ```
85
+
86
+ When `devOnly` is set to `true`:
87
+
88
+ - The sticky note is visible when running `slidev dev`
89
+ - The sticky note is **hidden** when running `slidev build` or `slidev export`
@@ -12,24 +12,24 @@ The Thumbs component has the following props:
12
12
  - `color` (optional) the color scheme of the thumb. the default is 'white'. The best options tend to be the light colors (e.g., `green-light`, `red-light`, `blue-light`)
13
13
  - `width` (optional) the initial width of the image. Default is 140px
14
14
 
15
- ```md
16
- <Thumb color='green-light' width="300px" v-drag />
15
+ ```vue
16
+ <Thumb color="green-light" width="300px" v-drag />
17
17
  ```
18
18
 
19
19
  Renders as:
20
20
 
21
21
  <Thumb color='green-light' width="300px"/>
22
22
 
23
- ```md
24
- <Thumb color="sky-light" v-drag />
23
+ ```vue
24
+ <Thumb color="sky-light" v-drag />
25
25
  ```
26
26
 
27
27
  Renders as:
28
28
 
29
29
  <Thumb color="sky-light" />
30
30
 
31
- ```md
32
- <Thumb color="red-light" dir='down' v-drag />
31
+ ```vue
32
+ <Thumb color="red-light" dir="down" v-drag />
33
33
  ```
34
34
 
35
35
  Renders as: