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
9 changes: 8 additions & 1 deletion app/components/ruby_ui/textarea/textarea.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ def default_attrs
ruby_ui__form_field_target: "input",
action: "input->ruby-ui--form-field#onInput invalid->ruby-ui--form-field#onInvalid"
},
class: "flex w-full rounded-md border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 border-border focus-visible:ring-ring placeholder:text-muted-foreground"
class: [
"flex w-full rounded-md border bg-background px-3 py-1 text-sm shadow-sm transition-colors border-border",
"placeholder:text-muted-foreground",
"disabled:cursor-not-allowed disabled:opacity-50",
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
]
}
end
end
Expand Down
8 changes: 8 additions & 0 deletions app/views/docs/textarea.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def view_template
RUBY
end

render Docs::VisualCodeExample.new(title: "Aria Disabled", context: self) do
<<~RUBY
div(class: "grid w-full max-w-sm items-center gap-1.5") do
Textarea(aria: {disabled: "true"}, placeholder: "Aria Disabled")
end
RUBY
end

render Docs::VisualCodeExample.new(title: "With FormField", context: self) do
<<~RUBY
div(class: "grid w-full max-w-sm items-center gap-1.5") do
Expand Down