web/lib/opal/src/components/README.md
High-level UI components built on the @opal/core primitives. Every component in this directory delegates state styling (hover, active, disabled) to Interactive.Stateless or Interactive.Stateful via CSS data-attributes and the --interactive-foreground / --interactive-foreground-icon custom properties — no duplicated Tailwind class maps.
Components are exposed via:
import { Button, SelectButton, OpenButton, Tag } from "@opal/components";
The barrel file at index.ts re-exports each component and its prop types. Each component imports its own styles.css internally.
| Component | Description | Docs |
|---|---|---|
| Button | Label and/or icon-only stateless button | README |
| SelectButton | Stateful toggle button with optional foldable content | README |
| OpenButton | Trigger button with rotating chevron for popovers | README |
| Tag | Small colored label for status/category metadata | README |
components/ in kebab-case (e.g. components/inputs/text-input/)styles.css for layout-only CSS (colors come from Interactive primitives)components.tsx with the component and its exported props typestyles.css at the top of your components.tsxREADME.md inside the component directory with architecture, props, and usage examplescomponents/index.ts, re-export the component:
export { TextInput, type TextInputProps } from "@opal/components/inputs/text-input/components";