Created
January 16, 2024 22:52
-
-
Save danielotieno/7b8d1539b7d96ea77b26dd7becc91d13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This example requires some changes to your config: | |
``` | |
// tailwind.config.js | |
module.exports = { | |
// ... | |
plugins: [ | |
// ... | |
require('@tailwindcss/forms'), | |
], | |
} | |
``` | |
*/ | |
export default function Example() { | |
return ( | |
<div className="bg-white py-16 sm:py-24 lg:py-32"> | |
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-10 px-6 lg:grid-cols-12 lg:gap-8 lg:px-8"> | |
<div className="max-w-xl text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl lg:col-span-7"> | |
<h2 className="inline sm:block lg:inline xl:block">Want product news and updates?</h2>{' '} | |
<p className="inline sm:block lg:inline xl:block">Sign up for our newsletter.</p> | |
</div> | |
<form className="w-full max-w-md lg:col-span-5 lg:pt-2"> | |
<div className="flex gap-x-4"> | |
<label htmlFor="email-address" className="sr-only"> | |
Email address | |
</label> | |
<input | |
id="email-address" | |
name="email" | |
type="email" | |
autoComplete="email" | |
required | |
className="min-w-0 flex-auto rounded-md border-0 px-3.5 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" | |
placeholder="Enter your email" | |
/> | |
<button | |
type="submit" | |
className="flex-none rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" | |
> | |
Subscribe | |
</button> | |
</div> | |
<p className="mt-4 text-sm leading-6 text-gray-900"> | |
We care about your data. Read our{' '} | |
<a href="#" className="font-semibold text-indigo-600 hover:text-indigo-500"> | |
privacy policy | |
</a> | |
. | |
</p> | |
</form> | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment