Svelte Contact Form - Flowbite Svelte Blocks

The contact section is an important part of your website where the user can reach out to your team by interacting with the form elements and submitting the data.

Default contact form #

Use this example of a contact form coded with Tailwind CSS including the email, subject, and message that can be delivered by clicking on the form submission button.

  • Svelte
<script lang="ts">
  import { Section, Contact } from 'flowbite-svelte-blocks';
  import { Label, Input, Textarea, Button } from 'flowbite-svelte';

<Section name="contact">
    <svelte:fragment slot="h2">Contact Us</svelte:fragment>
    <svelte:fragment slot="paragraph">Got a technical issue? Want to send feedback about a beta feature? Need details about our Business plan? Let us know.</svelte:fragment>
    <form class="space-y-8">
        <Label for="email" class="block mb-2">Your email</Label>
        <Input id="email" name="email" placeholder="" required />
        <Label for="subject" class="block mb-2">Subject</Label>
        <Input id="subject" name="subject" placeholder="Let us know how we can help you" required />
        <Textarea id="subject" name="subject" placeholder="Leave a comment..." label="Your message" />
      <Button>Send message</Button>

Component data