Sphinx Design Components#

The PyData Sphinx Theme uses sphinx-design to add several UI components and provide extra flexibility for content creation. These include badges, buttons, cards, and tabs, among other components. This theme provides custom CSS to ensure that sphinx-design elements look and feel consistent with this theme.

See also

For more information about how to use these extensions, see the sphinx-design documentation.

Below you can find some examples of the components created with the sphinx-design extension.

Cards#

Only heading

Only body.

But with multiple text paragraphs.

Heading and body

Content of the third card.

Sample badge

A card with a dropdown menu
Click to expand dropdown

Hidden content

A clickable card

panel 1 header

panel 1 content more content

panel 2 header

panel 2 content

Tabs#

int main(const int argc, const char **argv) {
    return 0;
}
def main():
    return
class Main {
    public static void main(String[] args) {
    }
}
function main()
end
PROGRAM main
END PROGRAM main

Copybuttons#

sphinx-copybutton adds a copy button to each of your code cells. You can see it in action by hovering over the code cell below:

print("A copybutton in the top-right!")

Toggle buttons#

sphinx-togglebutton allows you to convert admonitions into toggle-able elements.

A standalone toggle button!