Class: UI::Tabs
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::Tabs
- Includes:
- TabsBehavior
- Defined in:
- app/components/ui/tabs.rb
Overview
Tabs container component (Phlex) Root component for tabbed interface with keyboard navigation
Instance Method Summary collapse
-
#initialize(default_value: "", orientation: "horizontal", activation_mode: "automatic", classes: "", attributes: {}) ⇒ Tabs
constructor
A new instance of Tabs.
- #view_template(&block) ⇒ Object
Methods included from TabsBehavior
#merged_data_attributes, #tabs_data_attributes, #tabs_html_attributes
Constructor Details
#initialize(default_value: "", orientation: "horizontal", activation_mode: "automatic", classes: "", attributes: {}) ⇒ Tabs
Returns a new instance of Tabs.
28 29 30 31 32 33 34 35 |
# File 'app/components/ui/tabs.rb', line 28 def initialize(default_value: "", orientation: "horizontal", activation_mode: "automatic", classes: "", attributes: {}, **) @default_value = default_value @orientation = orientation @activation_mode = activation_mode @classes = classes @attributes = attributes super() end |
Instance Method Details
#view_template(&block) ⇒ Object
37 38 39 |
# File 'app/components/ui/tabs.rb', line 37 def view_template(&block) div(**tabs_html_attributes, &block) end |