Skip to content

Document theme options in readme #523

Closed

Description

@imnotashrimp

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?

Activity

  1. changed the title [-]document theme options in readme[/-] [+]Document theme options in readme[/+] on Jun 1, 2018
  2. RomanHotsiy commented on Jun 1, 2018

    @RomanHotsiy
    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!

  3. jjylha commented on Jun 8, 2018

    @jjylha

    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?

  4. RomanHotsiy commented on Jun 18, 2018

    @RomanHotsiy
    Member

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

  5. ShaneGMamet commented on Nov 26, 2018

    @ShaneGMamet

    @imnotashrimp Any updates on this?

  6. KimThibault commented on Jan 29, 2019

    @KimThibault

    Following

  7. adeelibr commented on Aug 26, 2019

    @adeelibr

    Following

  8. AlbertSuarez commented on Sep 17, 2019

    @AlbertSuarez

    Following

  9. sid22 commented on Oct 22, 2019

    @sid22

    Following

  10. kscheirer commented on Oct 27, 2020

    @kscheirer
    Contributor

    PR for this opened here #1438

  11. kscheirer commented on Jan 20, 2021

    @kscheirer
    Contributor

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

  12. siarhei-kurhuzenkau-idf commented on Nov 5, 2021

    @siarhei-kurhuzenkau-idf

    @RomanHotsiy , hello

    Can be used on tag attributes?

  13. self-assigned this
    on Jul 28, 2023
  14. lornajane commented on Nov 9, 2023

    @lornajane
    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions