umd-styles-library
    Preparing search index...
    • Composable element typography style selector

      Creates element typography styles with configurable type and theme.

      Parameters

      Returns JssObject

      JSS object with composed styles and appropriate className

      // Basic usage
      const eyebrowStyle = elements.compose('eyebrow');

      // With dark theme
      const darkEyebrow = elements.compose('eyebrow', { theme: 'dark' });

      // With explicit color
      const grayLabel = elements.compose('labelSmall', { color: token.color.gray.dark });

      // With theme-aware subdued color
      import { theme } from '@universityofmaryland/web-utilities-library/theme';
      const caption = elements.compose('small', { color: theme.subdued(isThemeDark) });

      1.7.0