Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

React components for building Cosmic powered websites and apps.

License

Notifications You must be signed in to change notification settings

cosmicjs/blocks

Repository files navigation

Blocks

Blocks are React components for building Cosmic powered websites and apps. Use Blocks to build website features such as landing pages, blogs, image galleries, events, and more.

Get started

View all Blocks

Explore the demo

Features

⚑️ Performance optimized

πŸ‘ Draft preview ready

πŸ› Ecommerce built-in

πŸ“± Mobile responsive

🌎 Localization ready

πŸŒ“ Dark mode ready

πŸ”§ Customizable

♿️ Accessible

🦺 Type safe

Blocks include

  • Blog
  • User management
  • Landing page
  • Ecommerce (powered by Stripe πŸ›’)
  • Contact form (powered by Resend βœ‰οΈ)
  • Events
  • FAQs
  • Testimonials
  • Navigation
  • Comments
  • Image gallery
  • File upload
  • and more!

Built with

  • React Server Components
  • Tailwind CSS
  • TypeScript
  • Next.js

Contributing

  1. Download this code repository and install the dependencies.
git clone https://github.com/cosmicjs/blocks
cd blocks
bun install
  1. Create a .env.local file with your Cosmic API keys. Find these after logging in to the Cosmic dashboard in Project > API keys. (Ask Cosmic support for a bucket export file to connect Blocks dynamic content.)
cp .env.example .env.local

It will look like this:

# .env.local
NEXT_PUBLIC_SOURCE_BUCKET_SLUG=change_to_your_bucket_slug
NEXT_PUBLIC_SOURCE_READ_KEY=change_to_your_bucket_read_key
  1. Run the app.
bun dev

Open http://localhost:3000.

License

Licensed under the MIT license.

About

React components for building Cosmic powered websites and apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /