@patternfly/pfe-core
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

@patternfly/pfe-core

Utilities for building PatternFly elements.

Controllers

  • CascadeController - cascades configured properties/attributes to child elements
  • ColorContextController - enables colour context detection
  • CssVariableController - caches computed styles
  • LightDOMController - controls a light-DOM mutation observer
  • Logger - logging utilities
  • PerfController - measures element upgrading performance
  • PropertyObserverController - caches set values for observed properties until element is updated
  • SlotController - utilities for managing slots and slotted content

Decorators

  • @bound - binds a decorated method to the object instance
  • @cascades - cascades the decorated property to configured light and shadow child elements
  • @initializer - executes a decorated method when the element upgrades and on DOM mutations (opt-out)
  • @observed - runs a callback when the decorated property changes
  • @time - tracks the time a method takes to complete using the performance API
  • @trace - debug decorator which logs the name and result of a class method whenever it runs

Directives

  • when - element-position directive which adds or removes an element depending on a condition

Functions

  • debounce - debounce a function
  • getRandomId - generate a random element ID, optionally with a given prefix

Package Sidebar

Install

npm i @patternfly/pfe-core

Weekly Downloads

3,580

Version

5.0.1

License

MIT

Unpacked Size

900 kB

Total Files

124

Last publish

Collaborators

  • dgutride
  • dlabrecq
  • patternfly-build
  • jeff-phillips-18
  • mturley
  • bennyp
  • mwcz
  • kylebuch8
  • evwilkin
  • schulj12
  • nicolethoen
  • heymp
  • zhawkins
  • dlabaj
  • ausuliv
  • adamviktora