Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document theme options in readme #523

Closed
imnotashrimp opened this issue Jun 1, 2018 · 13 comments
Closed

Document theme options in readme #523

imnotashrimp opened this issue Jun 1, 2018 · 13 comments
Assignees

Comments

@imnotashrimp
Copy link

I'd like to volunteer to write usage of the theme options.

Any chance you can give me some guidance on how to use it so I can get started?

@RomanHotsiy RomanHotsiy changed the title document theme options in readme Document theme options in readme Jun 1, 2018
@RomanHotsiy
Copy link
Member

@imnotashrimp awesome! Thanks!

The preferred way to use a theme is to pass it in the options of Redoc.init call: https://github.com/Rebilly/ReDoc#advanced-usage-of-standalone-version:

Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
  theme: {
    main: '#ff0000'
  }
}, document.getElementById('redoc-container'))

See the default theme for details: https://github.com/Rebilly/ReDoc/blob/master/src/theme.ts#L3

note you can use functions in the theme e.g.:

https://github.com/Rebilly/ReDoc/blob/63ae2e8e943b1cf2838db20c6c567156a2bfac45/src/theme.ts#L35

Theme can't be used on <redoc> tag attributes yet.

Feel free to ask additional question!

@jjylha
Copy link

jjylha commented Jun 8, 2018

So did I understand correctly that you can not theme ReDoc by using <redoc theme=""> at all the moment?

You have to use React component or Redoc.init to actually be able to theme anything?

@RomanHotsiy
Copy link
Member

@jjylha, yes, you've got it correctly.

@ShaneGMamet
Copy link

@imnotashrimp Any updates on this?

@KimThibault
Copy link

Following

3 similar comments
@adeelibr
Copy link

Following

@AlbertSuarez
Copy link

Following

@sid22
Copy link

sid22 commented Oct 22, 2019

Following

@kscheirer
Copy link
Contributor

PR for this opened here #1438

@kscheirer
Copy link
Contributor

PR was merged, I think this ticket can be closed.

@rbruggem
Copy link

@siarhei-kurhuzenkau-idf
Copy link

@RomanHotsiy , hello

Can be used on tag attributes?

@lornajane lornajane self-assigned this Jul 28, 2023
@lornajane
Copy link
Contributor

Documentation for the configuration, including theme options, has been updated. Find it here: https://redocly.com/docs/redoc/config/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests