Module: CCS::FrontendHelpers::GovUKFrontend::SkipLink

Included in:
CCS::FrontendHelpers::GovUKFrontend
Defined in:
lib/ccs/frontend_helpers/govuk_frontend/skip_link.rb

Overview

GOV.UK Skip Link

This helper is used for generating the skip link component from the GDS - Components - Skip link

Instance Method Summary collapse

Instance Method Details

Generates the HTML for the GOV.UK Skip link component

Parameters:

  • text (String)

    the text for the skip link

  • href (String) (defaults to: nil)

    the href for the skip link

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)


22
23
24
# File 'lib/ccs/frontend_helpers/govuk_frontend/skip_link.rb', line 22

def govuk_skip_link(text, href = nil, **)
  Components::GovUK::SkipLink.new(context: self, text: text, href: href, **).render
end