This page covers the remaining structural and utility components used in mdsvex content.
InstallationTabs component
npm install @motion-core/example npm install @motion-core/example pnpm add @motion-core/example pnpm add @motion-core/example bun add @motion-core/example bun add @motion-core/example yarn add @motion-core/example yarn add @motion-core/example Table sample
| Component | Source syntax | Notes |
|---|---|---|
table | Pipe table markdown | Wraps thead, tbody, tr, th, td |
Steps | <Steps>...</Steps> | Step container with counter context |
Step | <Step title="...">...</Step> | One numbered row; title is optional |
Steps and Step sample
Step with title
Reference text only. No tutorial sequence, just structure and spacing.
Second step
Another sample row showing numbering and title alignment.
Sample row without a `title` prop.
Component Preview
<script lang="ts">
import { cn } from '$lib/utils/cn';
import { themeStore } from '$lib/stores/theme.svelte';
import Sun from 'carbon-icons-svelte/lib/Sun.svelte';
import Moon from 'carbon-icons-svelte/lib/Moon.svelte';
type Props = {
class?: string;
};
const props = $props();
const className = $derived((props as Props).class ?? '');
</script>
<button
type="button"
class={cn(
'group transition-scale inset-shadow relative inline-flex size-7 items-center justify-center rounded-sm bg-background-inset text-foreground duration-150 ease-out active:scale-[0.95]',
className
)}
onclick={themeStore.toggle}
aria-label={themeStore.isDark ? 'Switch to light mode' : 'Switch to dark mode'}
>
<span class="sr-only">{themeStore.isDark ? 'Switch to light mode' : 'Switch to dark mode'}</span>
<span class="theme-toggle-icon theme-toggle-sun">
<Sun size={16} />
</span>
<span class="theme-toggle-icon theme-toggle-moon">
<Moon size={16} />
</span>
</button>
<style>
.theme-toggle-icon {
position: absolute;
opacity: 0;
filter: blur(4px);
scale: 0.25;
transition:
opacity 150ms ease-out,
filter 150ms ease-out,
scale 150ms ease-out;
will-change: opacity, filter, scale;
}
.theme-toggle-sun {
opacity: 1;
filter: blur(0);
scale: 1;
}
:global(.dark) .theme-toggle-sun {
opacity: 0;
filter: blur(4px);
scale: 0.25;
}
:global(.dark) .theme-toggle-moon {
opacity: 1;
filter: blur(0);
scale: 1;
}
</style>
<script lang="ts">
import { cn } from '$lib/utils/cn';
import { themeStore } from '$lib/stores/theme.svelte';
import Sun from 'carbon-icons-svelte/lib/Sun.svelte';
import Moon from 'carbon-icons-svelte/lib/Moon.svelte';
type Props = {
class?: string;
};
const props = $props();
const className = $derived((props as Props).class ?? '');
</script>
<button
type="button"
class={cn(
'group transition-scale inset-shadow relative inline-flex size-7 items-center justify-center rounded-sm bg-background-inset text-foreground duration-150 ease-out active:scale-[0.95]',
className
)}
onclick={themeStore.toggle}
aria-label={themeStore.isDark ? 'Switch to light mode' : 'Switch to dark mode'}
>
<span class="sr-only">{themeStore.isDark ? 'Switch to light mode' : 'Switch to dark mode'}</span>
<span class="theme-toggle-icon theme-toggle-sun">
<Sun size={16} />
</span>
<span class="theme-toggle-icon theme-toggle-moon">
<Moon size={16} />
</span>
</button>
<style>
.theme-toggle-icon {
position: absolute;
opacity: 0;
filter: blur(4px);
scale: 0.25;
transition:
opacity 150ms ease-out,
filter 150ms ease-out,
scale 150ms ease-out;
will-change: opacity, filter, scale;
}
.theme-toggle-sun {
opacity: 1;
filter: blur(0);
scale: 1;
}
:global(.dark) .theme-toggle-sun {
opacity: 0;
filter: blur(4px);
scale: 0.25;
}
:global(.dark) .theme-toggle-moon {
opacity: 1;
filter: blur(0);
scale: 1;
}
</style>