PHPackages                             norman-huth/nova-radio-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. norman-huth/nova-radio-field

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

norman-huth/nova-radio-field
============================

A Laravel Nova Radio field.

v1.2.0(2y ago)5200.7k↓13.9%9[2 issues](https://github.com/Muetze42/nova-radio-field/issues)MITPHPPHP ^8.0

Since Apr 17Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Muetze42/nova-radio-field)[ Packagist](https://packagist.org/packages/norman-huth/nova-radio-field)[ Fund](https://huth.it/coffee)[ Fund](https://ko-fi.com/normanhuth)[ RSS](/packages/norman-huth-nova-radio-field/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (19)Used By (0)

📦 Archived
----------

[](#-archived)

This repository is archived and no longer maintained.

If you offer, maintain, or know of an actively maintained alternative to this project, please contact me at ****.

If the alternative references this repository as its source, inspiration, predecessor, or migration path, I may list it here so existing users can find a maintained replacement.

---

Laravel Nova Radio Buttons Field
================================

[](#laravel-nova-radio-buttons-field)

A Radio Buttons field for [Laravel Nova](https://nova.laravel.com/).

[![Documentation](https://raw.githubusercontent.com/Muetze42/Muetze42/main/files/btn-documentation.jpg)](#install)[![Live Preview](https://raw.githubusercontent.com/Muetze42/Muetze42/main/files/btn-live-preview.jpg)](https://nova-demo.huth.it/resources/nova-radio-field-radios/1/edit)

[![Preview 1](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/preview.png)](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/preview.png)

[![Preview 2](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/inline.png)](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/inline.png)

[![Preview 3](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/grid.png)](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/grid.png)

[![Preview 4](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/without-label.png)](https://raw.githubusercontent.com/Muetze42/nova-radio-field/main/docs/without-label.png)

Install
-------

[](#install)

```
composer require norman-huth/nova-radio-field

```

Usage
-----

[](#usage)

```
use NormanHuth\NovaRadioField\Radio;

//..
Radio::make(__('Radio'), 'select')
    ->options([
        'S' => __('Small'),
        'M' => __('Medium'),
        'L' => __('Large'),
    ])
```

Advanced Usage
--------------

[](#advanced-usage)

### Field Help Text

[](#field-help-text)

> If you would like to place "help" text beneath a field, you may invoke the `help` method when defining your field:

```
Radio::make(__('Radio'), 'select')
    ->help(__('Help Text'))
```

### Help Text For Radio Label

[](#help-text-for-radio-label)

If you would like to place "help" text beneath a radio label, you may invoke the `radioHelpTexts` method when defining your field:

```
Radio::make(__('Radio'), 'select')
    ->radioHelpTexts([
        'S' => __('Select small size'),
        'L' => __('Select large size'),
    ])
```

### Default Value

[](#default-value)

By default, this field use the first array item as default. You can set another default value via the `default` method, which accepts a value or callback.

```
Radio::make(__('Radio'), 'select')
    ->default('M')

Radio::make(__('Radio'), 'select')
    ->default(function (NovaRequest $request) {
        return $request->user()->group_id;
    }))
```

### Inline Radio Boxes

[](#inline-radio-boxes)

If you would like to place the radios inline instead in columns use the `inline` method:

```
Radio::make(__('Radio'), 'select')
    ->inline()
```

### Styling

[](#styling)

#### Controlling Gap

[](#controlling-gap)

If you would like change the gap between radio buttons use the `gap` method:

**Default**: 1 (0.25rem)

MethodGap`->gap(0.5)`0.125rem`->gap(1.5)`0.375rem`->gap(2)`0.5rem`->gap(2.5)`0.625rem`->gap(3)`0.75rem`->gap(3.5)`0.875rem`->gap(4)`1rem`->gap(5)`1.25rem`->gap(6)`1.5rem`->gap(8)`2rem```
Radio::make(__('Radio'), 'select')
    ->gap(3)
```

#### Add Classes To Field

[](#add-classes-to-field)

You can add classes to the field class attribute by invoking the addClasses method when defining the field:

```
Radio::make(__('Radio'), 'select')
    ->addClasses(['text-center']),
```

#### Set Field Classes

[](#set-field-classes)

You can remove default field classes and set new classes of the field class attribute by invoking the setClasses method when defining the field:

```
Radio::make(__('Radio'), 'select')
    ->setClasses(['flex', 'flex-wrap', 'justify-between']),
```

#### Add Styles To Field

[](#add-styles-to-field)

You can add styles to the field style attribute by invoking the addStyles method when defining the field:

```
Radio::make(__('Radio'), 'select')
    ->addStyles(['max-width' => '25rem']),
```

#### Add Classes To Field Label's

[](#add-classes-to-field-labels)

You can add classes to the field label's class attribute by invoking the addClasses method when defining the field:

```
Radio::make(__('Radio'), 'select')
    ->addLabelClasses(['truncate']),
```

#### Add Styles To Field Label's

[](#add-styles-to-field-labels)

You can add styles to the field label's style attribute by invoking the addStyles method when defining the field:

```
Radio::make(__('Radio'), 'select')
    ->addLabelStyles(['max-width' => '10rem']),
```

### Example: Creating Grid Like 3rd Preview

[](#example-creating-grid-like-3rd-preview)

```
Radio::make(__('Radio'), 'select')
    ->options([
        'S' => __('Small'),
        'M' => __('Medium'),
        'L' => __('Large'),
        'E' => __('Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam'),
        'G' => __('Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam'),
    ])
    ->radioHelpTexts([
        'S' => __('Select small size'),
        'L' => __('Select large size'),
    ])
    ->gap(4)
    ->inline()
    ->addLabelStyles(['width' => '15rem']),
```

### Without Label Like 4th Preview

[](#without-label-like-4th-preview)

```
Radio::make(__('Radio'), 'select')
    ->withoutLabel()
    ->addClasses(['py-4'])
```

### Add A Title like 4th Preview

[](#add-a-title-like-4th-preview)

```
Radio::make(__('Radio'), 'select')
    ->title('Select A Size')
```

#### Add Classes To Title

[](#add-classes-to-title)

```
Radio::make(__('Radio'), 'select')
    ->addTitleClasses(['pt-2'])
```

Or remove default classes and set own:

```
Radio::make(__('Radio'), 'select')
    ->setTitleClasses([])
```

#### Add Styles To Title

[](#add-styles-to-title)

```
Radio::make(__('Radio'), 'select')
    ->addTitleStyles(['padding-left: 1rem'])
```

### Display Keys On Index &amp; Detail Page

[](#display-keys-on-index--detail-page)

If you would like to display the values instead the label, you may invoke the `displayUsingValues` method when defining the field 😉 :

```
Radio::make(__('Radio'), 'select')
    ->displayUsingValues()
```

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance53

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Recently: every ~39 days

Total

17

Last Release

944d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2579233?v=4)[Muetze](/maintainers/Muetze)[@muetze](https://github.com/muetze)

---

Top Contributors

[![Muetze42](https://avatars.githubusercontent.com/u/26193232?v=4)](https://github.com/Muetze42 "Muetze42 (44 commits)")[![Lupennat](https://avatars.githubusercontent.com/u/6160171?v=4)](https://github.com/Lupennat "Lupennat (1 commits)")[![wamesro](https://avatars.githubusercontent.com/u/5340873?v=4)](https://github.com/wamesro "wamesro (1 commits)")

---

Tags

laravellaravel-novanova-fieldlaravelnova

### Embed Badge

![Health badge](/badges/norman-huth-nova-radio-field/health.svg)

```
[![Health](https://phpackages.com/badges/norman-huth-nova-radio-field/health.svg)](https://phpackages.com/packages/norman-huth-nova-radio-field)
```

###  Alternatives

[ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

6163.5M22](/packages/ebess-advanced-nova-media-library)[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
