4.2.0
CoreButton

Button API

Every prop of Button, plus the 1 symbol it exports alongside them, generated from the package manifest.

import { Button } from '@oceanic-hub/brand-system'
Layer
core — shadcn-derived primitives.
Exports
Buttonalso: buttonVariantstypes: ButtonProps
Variants
  • variant: default | secondary | destructive | outline | ghost | link
  • size: sm | md | lg | icon | icon-sm | icon-lg
Contract
packages/brand-system/src/components/button.contract.test-d.ts
Demos
12 on the Button page — rendered live, hydrated
Source
packages/brand-system/src/components/button.tsx

Generated from manifest/component-manifest.json, so it cannot drift from the source. For what Button is for, how it composes and what it looks like, see Button.

Button

ButtonProps

Prop

Type

Also accepts everything from React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants>.

buttonVariants

A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.

(props?: ({ variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined; size?: "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): string

Parameters

Prop

Type

Variant axes

Read off the component's own cva config, so this table and the parts that consume it cannot disagree.

Prop

Type

On this page