
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@getcircuit/tailwind
Advanced tools
@getcircuit/tailwindCircuit's Tailwind config.
// tailwind.config.js
module.exports = {
presets: [require('@getcircuit/tailwind')],
}
Typography classes are based on Web Typography file of Cardboard Figma.
It creates the following format of classes:
.text-${weight}-${style}
Example: .text-light-subheading2, .text-default-button, .text-heavy-tiny.
The colors are based on Functional Colors file of Cardboard Figma.
| Color Type | Class format | Example |
|---|---|---|
| Foreground | .text-${colorName}-${styleName} | .text-critical-neutral |
| Background | .bg-${colorName}-${styleName} | .bg-brand-emphasis |
| Border | .border-${colorName}-${styleName} | .border-default-emphasis |
| Constant | .${text|bg|border}-constant-${colorName}-${intensity} | .text-constant-light-80, .bg-constant-dark-20 |
| Accent | .${text|bg|border}-accent-${colorName}-${styleName} | .text-accent-gold-emphasis, .border-teal-muted |
To change the colors to its dark variants. Just add the dark class to the top of the React tree via Twin.macro. Example:
import 'twin.macro'
export function App() {
return (
<div tw="dark"> // <-- this class will be compiled by Twin.macro to a hashed class name
<div tw="bg-default-subdued text-default-neutral">
Hello dark mode!
</div>
</div>
)
}
⚠️ The CSS class
.darkdoes not exist! That means that adding a.darkCSS class manually to the top of the HTML tree will not work. Just like the other Tailwind classes, Twin.macro will compile this class to a hashed class name.
ℹ️ Do not use
.bg-constant-light-100for white backgrounds. Use.bg-default-subduedwhich will properly translate when changing to dark mode.
The most challenging thing on this project is related to the colors and how they vary on dark theme. For that to work we were heavily inspired by this video by Tailwind.
Colors are mapped to CSS variables
Those CSS variables have RGB values
Example: "40, 111, 245". Notice that it's not a complete CSS color value, like: rgba(40, 111, 245, 1)
The alpha/opacity of the color is later applied by a Tailwind mechanism.
Example: rgba(var(--bg-inverted-neutral), var(--tw-bg-opacity))
When the .dark class is applied, the CSS variables are overwritten
FAQs
Circuit's Tailwind config.
The npm package @getcircuit/tailwind receives a total of 0 weekly downloads. As such, @getcircuit/tailwind popularity was classified as not popular.
We found that @getcircuit/tailwind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.