Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/ruby_ui/radio_button/radio_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def default_attrs
},
class: [
"h-4 w-4 p-0 border-primary rounded-full flex-none",
"disabled:cursor-not-allowed disabled:opacity-50"
"disabled:cursor-not-allowed disabled:opacity-50",
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
]
}
end
Expand Down
18 changes: 18 additions & 0 deletions app/views/docs/radio_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ def view_template
RUBY
end

render Docs::VisualCodeExample.new(title: "Disabled", context: self) do
<<~RUBY
div(class: "flex flex-row items-center gap-2") do
RadioButton(class: "peer",id: "disabled", disabled: true)
FormFieldLabel(for: "disabled") { "Disabled" }
end
RUBY
end

render Docs::VisualCodeExample.new(title: "Aria Disabled", context: self) do
<<~RUBY
div(class: "flex flex-row items-center gap-2") do
RadioButton(class: "peer", id: "aria-disabled", aria: {disabled: "true"})
FormFieldLabel(for: "aria-disabled") { "Aria Disabled" }
end
RUBY
end

render Components::ComponentSetup::Tabs.new(component_name: component)

render Docs::ComponentsTable.new(component_files(component))
Expand Down