Configuration
Lookbook uses your ViewComponent config so it normally doesn’t need any additional configuration to know where to look for your components and preview classes etc. However there are a number of Lookbook-specific configuration options that you may want to use.
Configuring Lookbook
You can add Lookbook configuration in your config/application.rb
file, an initializer or anywhere else you handle your Rails app configuration.
# config/application.rb
module MyApp
class Application < Rails::Application
# other app config...
config.lookbook.project_name = "Lookbook Demo"
end
end
Common Options
Below are a few of the most commonly used configuration options. For the complete list of options check out the configuration API docs.
project_name
- Type: String
-
Default:
"Lookbook"
The name of your project. Displayed in the Lookbook header.
config.lookbook.project_name = "Lookbook Demo"
debug_menu
- Type: Boolean
-
Default:
Rails.env.development?
Whether or not to show the debug menu in the Lookbook header.
config.lookbook.debug_menu = false # always hide the debug menu
ui_theme
- Type: String
-
Default:
"indigo"
The UI theme to use. Available options are:
indigo
(default)blue
zinc
config.lookbook.ui_theme = "zinc"