Wave Section

A full-width section whose top or bottom edge is a wavy SVG divider. Use it to transition between sections with different background colors.

Preview

<script>
  import { WaveSection } from '@vultra/flat';
</script>

<div class="bg-white">
  <WaveSection color="var(--flat-blue)" height="120px">
    <div class="h-40 flex items-center justify-center text-white">
      Content above the wave
    </div>
  </WaveSection>
</div>

<div class="bg-[var(--flat-teal)] h-24"></div>

Usage

<script>
  import { WaveSection } from '@vultra/flat';
</script>

<WaveSection color="var(--flat-purple)" flip height="150px">
  <div class="h-48 flex items-center justify-center text-white">
    Content below the wave
  </div>
</WaveSection>

Props

PropTypeDefaultDescription
colorstring'var(--flat-blue)'Section background color
flipbooleanfalseRender wave at the bottom instead of the top
heightstring'150px'Wave height
classstringundefinedAdditional CSS classes
childrenSnippetundefinedContent rendered on top of the wave

Install

npx @vultra/cli add flat-wave-section