R Observatory
Search
install.packages("shinyGovstyle")
CRAN 30-day downloads, method
602+29.7% up on the 30 days before, the better direction
Test coverage, method
96%of lines run by tests

Provides 'shiny' components styled using the GOV.UK Design System. See <https://design-system.service.gov.uk/components/> for component guidance.

Maintainer
Cam Race
Licence
GPL (>= 3)
Latest release
15 Oct 2026
First release
25 Oct 2021

Compare with another package

More details
Releases
7
Needs compilation
No
Needs R
>= 4.1.0
Config/roxygen2/version
8.1.0
Config/testthat/edition
3
Language
en-GB
LazyData
true
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("shinyGovstyle")
APA
Race, C., Baker, A., Bielby, R., Foster, C., Martin, J., Wong, S., & Wyatt, R. (2026). shinyGovstyle: Custom Gov Style Inputs for Shiny (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.shinyGovstyle
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA
Balamuta, J. J. (2026). R Observatory: Metrics for shinyGovstyle version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-28, which the citation names so these numbers can be found later.

All 13 check platforms pass.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    0.3.0
    Time taken
    107 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    0.3.0
    Time taken
    78 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.3.0
    Time taken
    100 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.3.0
    Time taken
    75 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    165 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.3.0
    Time taken
    50 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    206 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    172 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    100 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    98 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.3.0
    Time taken
    32 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    258 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.3.0
    Time taken
    145 s
  • 13 OK

Over time

No change since 4 Aug 2026

As a list (7)
ChangedWorst statusOKNotesWarningsErrors
4 Aug 2026OK13000
1 Aug 2026Note12100
8 Jun 2026OK12000
7 Jun 2026Note12100
8 Apr 2026OK14000
7 Apr 2026Error13001
10 Mar 2026OK14000

Since March 2026

Check results on CRAN

Total downloads in the last 30 days
603+27.8% up on the 30 days before, the better directionIt is the sum of 2 channels: CRAN and r2u. autoCRAN was counted over another window, so it is not added.

CRAN rank

5,092 of 26,530

CRAN

602 downloads in the last 30 days

Rank
5,092 of 26,530
Change
+29.7% up on the 30 days before, the better direction

It is in the total. Take it out

r2u

1 downloads in the last 30 days

Rank
19,986 of 30,526
Change
−87.5% down on the 30 days before, the worse direction

It is in the total. Take it out

autoCRAN

0 downloads in the last 7 days

It is not added because it has no figure for the last 30 days.

Over time

Compare downloads

Needs
12
Dependent packages
0
Suggested by
0
Needs (12)
Installing it adds
67 packages, 49.7 MB of source
Of those, need compilation
36
Optional extras (8)
Functions
101
Public exports
61
Lines of R code
6,771
Median complexity
2
Functions (101)
Size and composition

Lines by kind (18,636)

KindLinesShare
R code6,77136%
Tests5,79231%
Documentation4,71825%
Guides1,3557%

Lines by language

LanguageLinesShare
R12,24766%
Rd4,71825%
Vignettes1,3557%
Markdown3162%

Languages are counted from file extensions.

Files
286
R functions
101
Deprecated functions
9
Complexity
Median
2
Mean
3.46
Highest
16
Median lines per function
26
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
101
Calls
120
Unconnected
18
Groups
1
Growth (7 releases)
Total lines by release
4,002 on 25 Oct 202118,636 on 15 Oct 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
96.3%
Expressions run by tests
92.4%
Test cases
370
Exports named in tests
96.7%
Coverage by file (58)
Coverage run
Lines counted
2,589
Lines the tests ran
2,492
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat, tinytest
Test cases
370
Snapshot tests
20
Lines of tests
5,792
Test lines per line of code
0.86
Exports documented
100%
Arguments documented
99.3%
Return value documented
100%
Help pages with examples
81.7%
Examples run in checks
100%
Guides (4)
Other documentation
README
Yes, 251 words
Release notes file
Yes
Help pages
71
Lines of documentation
4,718
DatasetSizeColumns
bad_link_textLookup for bad link text54 × 1bad_link_text
case_dataCase data12 × 4tabs, case_manager, cases_open, cases_closed
transport_dataTransport data10 × 5months, colours, bikes, vans, buses
transport_data_smallTransport data small3 × 3months, bikes, cars
Earlier names (1)
  • Cameron Race

dfe-analytical-services / shinygovstyle on github.com

Stars
53+1.9% up on 30 days ago, the better direction
Forks
12
Open issues
16
Last commit
22 Oct 2026
Activity
Commits
416
Open pull requests
9
Tagged releases
11
Latest tagged release
v0.3.0, 16 Oct 2026
Issues closed in
211 days (median)
Pull requests closed in
11 days (median)
Pull requests merged
87%
Created
20 Jun 2019
Licence file reads as
GPL-3.0
Development practices (17)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Governance and communityCode of conduct, Contributing guide, PR template, CODEOWNERS
Docs sourcepkgdown
GitHub Pages site last deployed 2026-10-22
The repository has a site deploy workflow
pkgdown site last built 2026-10-22
Reproducibility and dev environmentdata-raw/
CRAN release processcran-comments.md, CRAN-SUBMISSION
Automation and maintenanceDependabot
Lint, format, editorAir, VS Code, RStudio project
Git structural.gitattributes

Method, repository practices

Across dfe-analytical-services

Claude Codeat least 9 crediting itClaude CodeFirst seen 29 Mar 2026at least 9 crediting it
Claude Sonnet 5Claude Sonnet 512 Sep 20261 commit
Claude Opus 4.7Claude Opus 4.719 May 20261 commit
Claude Opus 4.6Claude Opus 4.69 Apr 2026 to 12 May 20263 commits
Claude Sonnet 4.6Claude Sonnet 4.629 Mar 2026 to 12 Sep 20264 commits

Tools

ToolFirst seenFoundCommits crediting it
Claude Code29 Mar 2026Named in .Rbuildignore.claudeNamed in .gitignore.claudePull request it wrote: opened by a project member9 at least
  • Named in .Rbuildignore
  • Named in .gitignore
  • Pull request
  • Seen in the repository

Shared conventions

AGENTS.md.agents.agents/skills

Models

ModelCommitsFirst commitLast commitCredit lines of
Claude Sonnet 5112 Sep 202612 Sep 2026Claude Code
Claude Opus 4.7119 May 202619 May 2026Claude Code
Claude Opus 4.639 Apr 202612 May 2026Claude Code
Claude Sonnet 4.6429 Mar 202612 Sep 2026Claude Code

Across dfe-analytical-services

R releases
  • On CRAN
  • Release
VersionReleasedREvents
0.3.0 current15 Oct 20264.6.1
0.2.013 Apr 20264.5.3
0.1.18 Jan 20264.5.2Maintainer: Cam Race
0.1.012 Sep 20244.4.1
0.0.822 Feb 20224.1.2
0.0.74 Nov 20214.1.2
0.0.625 Oct 20214.1.1
Release notes (0.3.0)

This release is the transition to a stable v1.0.0. Functions and arguments

that will be removed in v1.0.0 now give a deprecation warning that names what

to use instead, so you can update your code before upgrading. Everything

deprecated keeps working in this release.

Deprecations

  • Four functions have been renamed to match the GOV.UK Design System component names. The old names still work, with a deprecation warning, and produce identical output:
  • insert_text() is now inset_text(). Its text argument is now content, reflecting that it accepts more than plain text; insert_text(text = ) gives a single warning pointing to inset_text(content = ).
  • banner() is now phase_banner(), with the same arguments.
  • tag_Input() is now gov_tag(), with the same arguments.
  • panel_output(inputId, main_text, sub_text) is now confirmation_panel(inputId, title, content).
  • gov_layout() is deprecated. Use gov_main_layout(gov_row(gov_box(..., size = size)), inputID = inputID, width = width) instead; the warning explains how each argument maps across. There is no single-function replacement.
  • contents_link() (deprecated in 0.2.0) will be removed in v1.0.0. Its warning now explains that service_navigation() is the recommended approach for multi-page layouts, and that in-page anchor links should be ordinary links to heading ids.
  • word_count() is deprecated as it is no longer required: text_area_Input(word_limit = ) now tracks and announces the word count entirely client-side, so the server-side word_count() observer can be deleted.
  • header() arguments main_text, secondary_text, main_link, secondary_link, main_alt_text, and secondary_alt_text will be removed in v1.0.0. The warnings for the four link and alt text arguments now say that they have no effect.
  • govReactableOutput()'s heading_level now takes an integer from 2L to 5L (default 2L). The "h2" to "h5" strings still work for now, with a warning showing the integer to use.

Breaking changes

  • Error message element ids changed from <inputId>error to <inputId>-error (matching the hint id format <inputId>-hint). This affects radio_button_Input(), checkbox_Input(), date_Input(), text_Input(), text_area_Input(), file_Input(), and input_field(). error_on() and error_off() have been updated to match and continue to work transparently; only custom CSS or JS that targets #fooerror selectors needs updating to #foo-error.
  • Removed the experimental full_width_overrides() function. Use the new width argument on header(), footer(), phase_banner(), cookieBanner(), service_navigation() and gov_main_layout() instead (see below).
  • bslib has moved from Suggests to Imports, since the new gov_page() function depends on it directly. If you install shinyGovstyle without its Suggests dependencies, you'll now get bslib automatically; if you pin dependencies some other way, add bslib to that list.
  • Heading and caption size arguments (e.g. size on heading_text(), caption_size on govTable() and govReactableOutput(), and label_size on form inputs like checkbox_Input()) now throw an error if given anything other than "s", "m", "l", or "xl". Previously an invalid value was accepted silently and could produce broken styling.

New features

  • govReactable() gains a columns argument for column-specific overrides, such as fixing a column's decimal places with reactable::colFormat(). Only the fields you set are applied; any field you leave unset keeps govReactable's GOV.UK default for that column. Previously, passing a columns argument through ... errored with formal argument "columns" matched by multiple actual arguments (#243).
  • New gov_page() function, a GOV.UK-flavoured wrapper around bslib::page_fluid(). It sets <html lang="en"> by default (screen readers use this to choose the right pronunciation and voice), adds a description argument for the page's <meta name="description"> tag, and a width argument that sets a default width for every shinyGovstyle component used inside it, so you don't have to repeat width = on each one. A component that sets its own width always overrides the page default.
  • header(), footer(), phase_banner(), cookieBanner(), service_navigation(), gov_main_layout() and the deprecated gov_layout() gain a width argument for building wider, dashboard-style layouts: "standard" (the default, GOV.UK's usual 960px content width), "three-quarters" (three-quarters of the viewport, never narrower than standard), "full" (edge-to-edge, with grid gutters also removed), or a CSS length (e.g. "1400px", "90vw") for a custom max-width.
  • external_link()'s add_warning argument now also accepts "icon", in addition to TRUE/FALSE. Setting add_warning = "icon" adds a small decorative arrow icon after the link text, giving sighted users a visual warning that the link opens in a new tab without repeating the "(opens in new tab)" text, which is useful for grouped links (see the "Grouped links" section of the "Headings and text" vignette). The icon is hidden from screen readers, which get the same hidden warning as add_warning = FALSE.
  • New update_page_title() function to update the browser tab title from server code, mirroring update_service_navigation(). Compose a title in the GOV.UK recommended format "<page> | <service>" by supplying both page_title and service_name.
  • service_navigation() gains auto_page_title and page_title_suffix arguments. With auto_page_title = TRUE (the default) the browser tab title is kept in sync with the active nav link, both for direct clicks and for programmatic navigation via update_service_navigation().
  • New service_navigation_server() wires every nav link to its tab panel in a single server-side call, eliminating the per-link observeEvent() boilerplate that multi-page apps previously needed.
  • New navigate_to() combines updateTabsetPanel() and update_service_navigation() into one call for programmatic navigation (next / back buttons, footer shortcuts, modal links). Accepts a panel argument when the nav link inputId and the tab panel value differ.
  • New update_radio_button_Input() function, the server-side companion to radio_button_Input() (mirroring shiny::updateRadioButtons()). Use it to change the selected option, choices, or label of a radio group from the server, for example to keep a cookies settings radio in sync with a cookie banner choice. See the new "Cookies and analytics" vignette.
  • inset_text() (content), confirmation_panel() (content), noti_banner() (body_txt), details() (help_text), phase_banner() (label), warning_text() (text), and gov_summary() (info) now accept shiny tag objects (e.g. shiny::tags$b("Bold")) and shiny::tagList() values in addition to plain character strings.
  • gov_list() (list) and accordion() (descriptions) now accept shiny tag objects and shiny::tagList() values, so list items and accordion sections can contain links and other rich content. accordion() section content is no longer forced into a single paragraph, so it can hold block content such as lists or multiple paragraphs (plain-string sections are unchanged).
  • The label and hint_label / hint_input arguments of label_hint(), text_Input(), text_area_Input(), date_Input(), select_Input(), checkbox_Input(), and radio_button_Input() now consistently accept plain strings, HTML strings, shiny tag objects, and shiny::tagList() values. Previously labels accepted HTML strings but not tags, while hints accepted tags but not HTML strings.
  • phase_banner() gains a feedback_url argument that auto-generates the standard GOV.UK phase banner feedback text (e.g. "This is a new service - your feedback (opens in new tab) will help us to improve it."), or contact-style text if feedback_url is a mailto: link. label is now optional, but exactly one of label or feedback_url must be supplied.
  • external_link() now natively supports mailto: links: when href starts with mailto:, the "opens in new tab" attributes, text, and icon are all skipped, since a mailto link hands off to the mail client rather than opening a new tab. Existing link-text validations still apply.

Bug fixes

  • service_navigation() now gives an error when two links end up with the same inputID (for example "Page 1" and "Page-1", which both become page_1), rather than silently creating clashing links. The links documentation now correctly says that inputIDs supplied in a named vector are cleaned up in the same way as generated ones. update_service_navigation(), navigate_to() and service_navigation_server() now clean up the inputIDs you pass them in the same way, so an id such as "Page-Two" works in all of them. Previously they used the id as given, so it silently failed to match the page_two link.
  • The active service_navigation() link now has aria-current="page", as in the GOV.UK Design System, so screen readers announce which page is current. Previously only the visual highlight changed. The first link is now marked as the current page when the app loads.
  • gov_tag() and value_box() now warn when colour is not one of their supported colours (for example a typo such as "gren"), listing the options, rather than silently falling back to the default styling. A colour that is not a single string now gives a clear error.
  • Updated GOV.UK Frontend from v6.1.0 to v6.6.0.
  • button_Input(type = "start") now wraps a rich HTML label in a span so it wraps correctly on narrow screens, following GOV.UK Frontend 6.4.0.
  • service_navigation() now syncs the browser tab title with the active page by default. Screen readers announce the title on navigation, so a static title is an accessibility issue for multi-page dashboards. This is a behaviour change; set auto_page_title = FALSE on service_navigation() to restore the previous behaviour.
  • header() no longer emits spurious deprecation warnings for main_link, secondary_link, main_alt_text, and secondary_alt_text when those arguments are not used.
  • accordion() sections now operate independently of one another, so expanding or collapsing sections in one accordion no longer affects a different accordion on the same page.
  • accordion() sections and the "Show all sections" control now correctly announce their state via aria-expanded, and toggling an individual section keeps the "Show all sections" control's text, chevron, and aria-expanded state in sync.
  • Error messages on input components now use role="alert" so they are announced by screen readers when toggled via error_on().
  • The visually hidden "Error:" prefix on input component error messages now comes before the message text, so screen readers announce "Error: Enter your name" rather than "Enter your name Error:". The prefix also survives error_on(error_message = ...), which previously replaced it.
  • error_on() now escapes a plain string error_message instead of sending it to the browser as raw HTML, so it renders the same way as the message baked into the component (< and & are no longer swallowed, and interpolated user content can no longer inject markup). Pass a shiny tag, shiny::tagList(), or shiny::HTML() to render markup deliberately.
  • date_Input() now renders its hint before the error message, matching the GOV.UK Design System and the other input components.
  • govReactable() table row, sort-header, and pagination highlights are now visible in Windows High Contrast / forced-colours mode.
  • details() now applies the same HTML handling to help_text as it does to label, so HTML strings render consistently across both arguments.
  • warning_text() now renders HTML strings in text consistently with other body-content components.
  • govTable() no longer errors with "evaluation nested too deeply: infinite recursion" on large tables (around 1200+ rows). It now warns when given more than 50 rows and recommends govReactable() for very large or interactive tables.
  • The radio_button_Input() client binding now correctly replaces all options when sent an options update (the previous selectors did not match the rendered markup, so option replacement silently did nothing).
  • radio_button_Input()'s client binding now correctly reads and updates the group label (update_radio_button_Input(label = ...), and Shiny's built-in bookmarking). The previous selector targeted the old <label for=...> markup, which no longer exists now that the label renders inside a <legend> via the shared fieldset helper.
  • govTable() now renders rows in dataframe order (row order was previously silently reversed).
  • text_area_Input()'s word-limit message is now a live region (aria-live="polite"), announced to screen readers a short pause after the user stops typing, matching the GOV.UK Design System character count component. Previously it updated visually on every keystroke but was never announced.
  • radio_button_Input(), checkbox_Input(), and date_Input() now wrap their contents in a <fieldset> with a <legend> (previously they used a <label> inside the fieldset, which is invalid and meant screen readers did not announce the question as group context). Any hint or error message is linked to the fieldset via aria-describedby, so screen readers read the hint/error when the group receives focus. radio_button_Input(), checkbox_Input(), and date_Input() gain label_size ("s"/"m"/"l"/"xl", default "m") and heading_level (1-6, optional) arguments that control the legend size and optionally wrap it as a page heading following the GDS pattern.
  • radio_button_Input() inputs and labels are now programmatically associated via matching id/for attributes, and checkbox labels now also carry for attributes. date_Input() Day/Month/Year labels are likewise associated with their underlying inputs via for/id.
  • govTabs now includes full ARIA roles (tablist, tab, tabpanel) and attributes (aria-selected, aria-controls, aria-labelledby) so screen readers correctly identify and navigate tabs.