# gatsby-theme-contact

> Contact page for Gatsby which comes with Netlify Forms by default.

Latest version **3.0.0** (published 2021-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-theme-contact
pnpm add gatsby-theme-contact
yarn add gatsby-theme-contact
bun add gatsby-theme-contact
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-06-03 |
| First published | 2020-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 805.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Björn Clees |
| Maintainers | pyrax |
| Keywords | gatsby, gatsby-plugin, gatsby-theme, gatsby-theme-contact, contact, theme, form, forms, netlify, react-netlify-forms |

## Links

- npm: https://www.npmjs.com/package/gatsby-theme-contact
- Repository: https://github.com/Pyrax/gatsby-theme-contact
- Homepage: https://github.com/Pyrax/gatsby-theme-contact#readme
- Issues: https://github.com/Pyrax/gatsby-theme-contact/issues
- npm.io page: https://npm.io/package/gatsby-theme-contact

## Dependencies (4)

- [theme-ui](https://npm.io/package/theme-ui.md) ^0.9.1
- [react-social-icons](https://npm.io/package/react-social-icons.md) ^4.1.0
- [react-netlify-forms](https://npm.io/package/react-netlify-forms.md) ^1.3.0
- [gatsby-plugin-theme-ui](https://npm.io/package/gatsby-plugin-theme-ui.md) ^0.9.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-06-03
- 2.0.0 — 2020-08-10
- 1.0.6 — 2020-08-06
- 1.0.5 — 2020-08-06
- 1.0.4 — 2020-06-30
- 1.0.3 — 2020-06-30
- 1.0.2 — 2020-06-26
- 1.0.1 — 2020-06-26
- 1.0.0 — 2020-06-26

## README

# gatsby-theme-contact

Gatsby theme for a styled serverless contact page using Netlify Forms. It can also be customized to work with other backend services than Netlify by [shadowing](https://www.gatsbyjs.org/docs/themes/shadowing/) the form component.

**IMPORTANT NOTE: Form submission by default only works on Netlify because it uses Netlify Forms. For other hosting services you have to override the form.**

![Theme preview](https://raw.github.com/Pyrax/gatsby-theme-contact/master/.github/static/images/theme-preview.png)

## Installation

1. Install the theme and (optionally) theme-ui:

   ```sh
   npm install gatsby-theme-contact theme-ui gatsby-plugin-theme-ui
   ```

2. Add the configuration to your `gatsby-config.js` file:

   ```js
   // gatsby-config.js
   module.exports = {
     siteMetadata: {
       // Links to your social networks:
       social: [
         {
           url: 'https://github.com/Pyrax',
           name: 'GitHub'
         }
       ]
     },
     plugins: [
       {
         resolve: `gatsby-theme-contact`,
         options: {
           contactPath: '/contact',
           successPath: '/thanks'
         }
       }
     ]
   }
   ```

3. Shadow `details`-component to customize your address etc. (this is where you might need theme-ui)

   ```js
   // src/gatsby-theme-contact/components/details.js
   /** @jsx jsx */
   import React from 'react'
   import { jsx, Themed } from 'theme-ui'

   const Details = () => (
     <>
       <Themed.h3 sx={{ mt: 0 }}>Address</Themed.h3>
       <span>
         David Mathews
         <br />
         1011 Malesuada Road
         <br />
         Moscow Kentucky 77382
       </span>

       <Themed.h3>Phone</Themed.h3>
       <span>(357) 616-5411</span>

       <Themed.h3>Email</Themed.h3>
       <span>
         <Themed.a href='mailto:email@example.com'>email@example.com</Themed.a>
       </span>
     </>
   )

   export default Details
   ```

## Available options

| Key           | Default value | Description                                                      |
| ------------- | ------------- | ---------------------------------------------------------------- |
| `contactPath` | `/contact`    | URL of the contact form.                                         |
| `successPath` | `/thanks`     | URL of the form action where users without JavaScript will land. |

---
_Source: https://npm.io/package/gatsby-theme-contact · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
