Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/caption

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/caption

Renders children passed inside a styled span element.

  • 0.9.0
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Caption

Import

  import Caption from '@govuk-react/caption';

Usage

Simple

import { Caption } from 'govuk-react'

<Caption>Caption heading text</Caption>

With another header

import { H1 } from 'govuk-react'

<Caption size="XL">Supporting header text</Caption>
<H1>Main header text</H1>

References

  • https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/core/_typography.scss
  • https://design-system.service.gov.uk/styles/typography/#headings

Properties

PropRequiredDefaultTypeDescription
childrentrue``````stringText to be rendered as a caption
size'XL'enum(...Object.keys(CAPTION_SIZES) | ...Object.keys(TYPOGRAPHY_SCALE))Visual size level, accepts:
XLARGE, LARGE, MEDIUM, XL, L, M
or a numeric size that fits in the GDS font scale list

FAQs

Package last updated on 30 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc