Code block
Style
A code block displays read-only text with code formatting within a light gray container.
Anatomy
Theme
A code block is available in both light and dark themes.
Light theme
Dark theme
Configuration
Code block text is always horizontally and vertically centered.
Space
Container spacing reduces as breakpoints get smaller.
Example | Token | Description |
---|---|---|
16 | --rh-space-lg | 16px spacer |
24 | --rh-space-xl | 24px spacer |
Interaction states
A code block includes only text and is not interactive right now.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.