Prop Docs and Types
Boreal UI publishes shared TypeScript declarations and generated prop metadata so apps, docs pages, and playgrounds can stay aligned with the package.
Types stay separate
Import declarations from @boreal-ui/types so runtime bundles do not load type-only packages.
Generated docs
Prop metadata ships from @boreal-ui/core/docs and @boreal-ui/next/docs for exhaustive tables and custom documentation surfaces.
Component subpaths
Component-specific declarations are available through @boreal-ui/types/core/[component] and @boreal-ui/types/next/[component].
Shared Types
types.tsts
import type {
BorderType,
ColorScheme,
RoundingType,
ShadowType,
SizeType,
StateType,
ThemeType,
} from "@boreal-ui/types";| ThemeType | primary, secondary, tertiary, quaternary, clear |
|---|---|
| StateType | success, error, warning, info, disabled, empty string |
| SizeType | xs, small, medium, large, xl |
| RoundingType | none, small, medium, large, full |
| ShadowType | none, light, medium, strong, intense |
| BorderType | none, xs, small, medium, large, xl |
| ColorScheme | Named color scheme object used by theming APIs. |
Component Types
Use component-specific type subpaths when wrapping Boreal components.
wrapped-button.tsxtsx
import { Button } from "@boreal-ui/core";
import type { ButtonProps } from "@boreal-ui/types/core/Button";
type SaveButtonProps = Omit<ButtonProps, "type" | "children"> & {
label?: string;
};
export function SaveButton({ label = "Save", ...props }: SaveButtonProps) {
return (
<Button type="submit" theme="primary" {...props}>
{label}
</Button>
);
}Generated Prop Metadata
prop-docs.tsts
import {
buttonPropDocs,
cardPropDocs,
dataTablePropDocs,
type GeneratedComponentDoc,
type GeneratedPropDoc,
} from "@boreal-ui/core/docs";
import {
buttonPropDocs as nextButtonPropDocs,
} from "@boreal-ui/next/docs";Metadata Shape
- GeneratedComponentDoc includes name, interfaceName, description, sourcePath, and props.
- GeneratedPropDoc includes name, type, description, required, inherited, category, and optional defaultValue.
- Prop metadata is generated from source types and shipped with the package.