Release control
Artifacts
Published builds
Newest first.
| Name | Status | |
|---|---|---|
| cli@1.0.0 | Active |
# @opencode-ai/css OpenCode's design system as plain CSS. It has no JavaScript, framework, build tool, or runtime dependency. Use semantic HTML and `data-*` attributes. Native browser states such as `:hover`, `:focus-visible`, and `:disabled` work automatically; your JavaScript can represent application state with attributes such as `data-expanded`, `data-checked`, and `data-invalid`. ## Install ```sh npm install @opencode-ai/css ``` Load the complete design system from JavaScript: ```js import "@opencode-ai/css" ``` Or from CSS: ```css @import "@opencode-ai/css"; ``` For a static page with no package tooling: ```html ``` Add `data-oc-root` to the element that should receive the default page background, text color, and font. Set `data-color-scheme` to `light` or `dark` on that element or an ancestor. ```html
``` ## Selective imports The default export contains every component. Small pages can load only what they use: ```css @import "@opencode-ai/css/tokens.css"; @import "@opencode-ai/css/base.css"; @import "@opencode-ai/css/components/button.css"; @import "@opencode-ai/css/components/badge.css"; @import "@opencode-ai/css/components/table.css"; ``` `tokens.css` defines the color ramps and semantic theme variables. `base.css` is intentionally small and scoped: it only applies the full-page defaults to `[data-oc-root]` and normalization to design-system elements. ## Common components ### Button ```html ``` Variants: `neutral`, `contrast`, `outline`, `ghost`, `ghost-muted`, `danger`, `warning`, and `loading`. Sizes: `small`, `normal`, and `large`. ### Badge ```html Inactive Active ``` ### Internal-tool page ```htmlRelease control
Newest first.
| Name | Status | |
|---|---|---|
| cli@1.0.0 | Active |