GatsbyJS Theme Octahedroid
A marketing component library styled with Tailwind CSS and Theme UI
Get started
Install Gatsby CLI:
npm i --global gatsby-cli
Create new Gatsby project:
gatsby new my-new-website
Add this theme as a dependency for your site and the tailwindcss library:
cd my-new-websitenpm install gatsby-theme-octahedroid tailwindcssoryarn add gatsby-theme-octahedroid tailwindcss
Then in your gatsby-config.js
file use the theme as a plugin and in the options themePath
add your theme file route like this:
moduleexports = plugins: resolve: `gatsby-theme-octahedroid` options: root: __dirname themePath: `/theme` ;
Theme requirements
In your site src/
create a folder called images/
and put the images you want to use in your site, this is for the theme to be able to create faster images.
Theme provider
In order for Theme UI to use you new theme settings you need to use the <ThemeProvider />
component and pass your theme file as the theme
prop, we recommend the use of a Layout component for this, an example of a layout component is included in the src/components/layout-example.js
.
Theme configuration
If you want to change the components color, fonts, sizes, etc you must create a theme.js
file at the root of your project, you can extend the original theme by shadowing the original theme file like this:
const baseTheme = ; const myTheme = ...baseTheme colors: ...baseThemecolors primary: '#0CBFC7' secondary: '#542c85' accent: '#E8DA8B' darkShade: '#37375B' lightShade: '#F7F7F7' height: ...baseThemeheight hero: '700px' styles: ...baseThemestyles h1: ...baseThemeheading fontSize: "4rem" h2: ...baseThemeheading fontSize: "2.5rem" h3: ...baseThemeheading fontSize: "2rem" h4: ...baseThemeheading fontSize: "1.5rem" h5: ...baseThemeheading fontSize: "1.25rem" fontWeight: 'body' h6: ...baseThemeheading fontSize: "1rem" // console.log(myTheme);moduleexports = myTheme;
Deploy
Resources
Credits
- Images - undraw.co
Support
For issues and features request, use Github or access the support page provided by Octahedorid
Upcoming featured
@TODO post install scripts for initial setup