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";
Common public types
ThemeTypeprimary, secondary, tertiary, quaternary, clear
StateTypesuccess, error, warning, info, disabled, empty string
SizeTypexs, small, medium, large, xl
RoundingTypenone, small, medium, large, full
ShadowTypenone, light, medium, strong, intense
BorderTypenone, xs, small, medium, large, xl
ColorSchemeNamed 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.