This repository was archived by the owner on May 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
components/ruby_ui/radio_button Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ def default_attrs
1717 } ,
1818 class : [
1919 "h-4 w-4 p-0 border-primary rounded-full flex-none" ,
20- "disabled:cursor-not-allowed disabled:opacity-50"
20+ "disabled:cursor-not-allowed disabled:opacity-50" ,
21+ "aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
2122 ]
2223 }
2324 end
Original file line number Diff line number Diff line change @@ -27,6 +27,24 @@ def view_template
2727 RUBY
2828 end
2929
30+ render Docs ::VisualCodeExample . new ( title : "Disabled" , context : self ) do
31+ <<~RUBY
32+ div(class: "flex flex-row items-center gap-2") do
33+ RadioButton(class: "peer",id: "disabled", disabled: true)
34+ FormFieldLabel(for: "disabled") { "Disabled" }
35+ end
36+ RUBY
37+ end
38+
39+ render Docs ::VisualCodeExample . new ( title : "Aria Disabled" , context : self ) do
40+ <<~RUBY
41+ div(class: "flex flex-row items-center gap-2") do
42+ RadioButton(class: "peer", id: "aria-disabled", aria: {disabled: "true"})
43+ FormFieldLabel(for: "aria-disabled") { "Aria Disabled" }
44+ end
45+ RUBY
46+ end
47+
3048 render Components ::ComponentSetup ::Tabs . new ( component_name : component )
3149
3250 render Docs ::ComponentsTable . new ( component_files ( component ) )
You can’t perform that action at this time.
0 commit comments