Brand Your Storybook with a Custom Logo
Let’s make Storybook a project logo. We’ll start by putting all the pieces in place.
- In the
.stoyrybook
directory, create a newmanager
module.- Import
addons
from “@storybook/manager-api” - And
create
from “@storybook/theming”
- Import
Add an image to the /public
directory. (Storybook 7 serves this directory by default.)
Now we’re ready to set up a custom theme.
Set persistant light or dark color scheme
Create a new config object using addons.setConfig
.
Use the create function to provide the theme
property.
Now add brandTitle
, brandUrl
, brandImage
, and optional brandTarget
to flesh out the custom logo and where it links.
Restart to see changes.
This is looknig more like yours already!