![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
gatsby-theme-emulsify
Advanced tools
The Emulsify Gatsby Theme is a fully customizable/themeable style guide generator built with Gatsby. It reads your documentation and component library and builds a style guide for you. Using MDX you can author custom documentation for your components as well as any other pages for your design system audience.
As per Gatsby theme best practices, this repo is a Yarn workspace containing the Gatsby theme as well as an example
directory to see how to use it in a project.
To install just the Gatsby theme in your project, run:
npm i gatsby-theme-emulsify
Writing MDX (and Markdown) is supported out of the box. As you can see in the example project, if you create a styleguide
directory in the root of your starter (this path is configurable in your gatsby-config.js
file) and start adding directories and pages, they will automatically populate to the style guide. Note: the Components
directory will be treated uniquely because it is expected that your project components live separately - read on for more info about documenting components:
By default, this project will look for component documentation in your components
directory, but that path is also configurable via gatsby-config.js
. Create an MDX (or Markdown) file alongside any component in that directory to document it and the Gatsby theme will automatically consume them.
If you'd like to display isolated components in your style guide, there is built-in support for Storybook. To leverage this in your project, follow Storybook's instructions for installing. Here were the steps we took to install in the example
project:
npx -p @storybook/cli sb init
package.json
, change your Storybook build script to be:"build-storybook": "build-storybook -o static/storybook"
package.json
, you can change the following two Gatsby commands to be:"develop": "npm run build-storybook && gatsby develop",
"build": "npm run build-storybook && gatsby build",
Now, when running yarn develop
, you will be building your Storybook instance to Gatsby's static directory as a part of your Gatsby workflow.
Now, you can go to the MDX file where you'd like to display your component and use the following MDX shortcode:
<StorybookComponent id="button--emoji" />
The id
for your component is the ID that Storybook uses to identify the component in their iframe, which is COMPONENT_DIRECTORY--COMPONTENT_NAME
(you can find this in the Storybook URL). Now you will see your component shown in your documentation. See the example
components directory for usage ideas. Also, there is a height prop that you can configure to increase the height of the iframe (e.g., <StorybookComponent id="button--emoji" height="100px" />
).
You can also show component code in your MDX files using the traditional backtick syntax (uses PRISMJS and Prism React Rendered) like so:
```html
<div class="cta">
<h2>This is a call to action</h2>
<Button>Click here</Button>
</div>```
<DarkWrapper>
: Wraps the contents of this component in a "dark" wrapper (opposite of background color). Usage:
<DarkWrapper>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
</DarkWrapper>
The style guide should match your organization's identity, so it is important that this project is fully customizable.
We use Theme UI to manage the styling of the theme. This API-based method of building allows you to easily update/extend/override via config for quickly changing the look/feel. See their documentation for details, and the example
theme for an example override file (example/src/gatsby-plugin-theme-ui/index.js
). Also, this allows us to quickly implement a dark mode, which is enabled by default (also to add new modes).
For complete control, Gatsby themes allow fully overriding components via shadowing. From the layout to specific components, this allows you full customization over the look/feel and even functionality of the project.
yarn
from root to install dependenciesyarn develop
at root will actually run yarn workspace example develop
.FAQs
A Style Guide Generator using MDX and Theme UI. It reads your documentation and component library and generates a style guide.
The npm package gatsby-theme-emulsify receives a total of 0 weekly downloads. As such, gatsby-theme-emulsify popularity was classified as not popular.
We found that gatsby-theme-emulsify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.