DefaultLabelColorStyle

See source code

Default label color style property used for text labels on shapes. This is separate from the main color style to allow different colors for shape fills/strokes versus their text labels.

DefaultLabelColorStyle: import('./StyleProp').EnumStyleProp<
  | 'black'
  | 'blue'
  | 'green'
  | 'grey'
  | 'light-blue'
  | 'light-green'
  | 'light-red'
  | 'light-violet'
  | 'orange'
  | 'red'
  | 'violet'
  | 'white'
  | 'yellow'
>

Example

import { DefaultLabelColorStyle } from '@tldraw/tlschema'

// Use in shape props definition
interface MyShapeProps {
  labelColor: typeof DefaultLabelColorStyle
  // other props...
}

// Create a shape with different fill and label colors
const shape = {
  // ... other properties
  props: {
    color: 'blue' as const,
    labelColor: 'white' as const,
    // ... other props
  },
}
Prev
DefaultHorizontalAlignStyle
Next
defaultShapeSchemas