DefaultFillStyle

See source code

Default fill style property used by tldraw shapes for interior styling. Controls how the inside of shapes are filled or left empty.

Available values:

  • none - No fill, shape interior is transparent
  • semi - Semi-transparent fill using the shape's color
  • solid - Solid fill using the shape's color
  • pattern - Crosshatch pattern fill using the shape's color
  • fill - Alternative solid fill variant
DefaultFillStyle: import('./StyleProp').EnumStyleProp<
  'fill' | 'none' | 'pattern' | 'semi' | 'solid'
>

Example

import { DefaultFillStyle } from '@tldraw/tlschema'

// Use in shape props definition
interface MyShapeProps {
  fill: typeof DefaultFillStyle
  // other props...
}

// Create a shape with solid fill
const shape = {
  // ... other properties
  props: {
    fill: 'solid' as const,
    // ... other props
  },
}
Prev
DefaultDashStyle
Next
DefaultFontFamilies