# Element

**Path:** Components/Advanced

[Back to Documentation Index](http://rubicblazor.skyconis.com/docs.md)

---

Element

 RbElement is a primitive component that allows you to create custom components and render any HTML element dynamically.
 It accepts all standard HTML attributes and provides full control over styling and behavior.

 Basic Usage

 Simple examples demonstrating different HTML tags with custom attributes and styling.

 Show code

 Link Element

 Visit our

 Home Page

 Button Element

 Click Me (0)

 Div Element

 This is a custom div element with custom styling.

 Span Element

 Highlighted Text

 Button Clicks: 0

 HTML Tags

 Render different HTML elements using the HtmlTag parameter.

 Show code

 Heading Tags

 This is an H1 heading

 This is an H2 heading

 This is an H3 heading

 This is an H4 heading

 Text Tags

 This is a paragraph element.

 This is strong text. 
 This is emphasized text. 
 This is code text. 

 List Tags

 First item

 Second item

 Third item

 Input Tags

 Checkbox input
 Radio input

 Interactive Elements

 Change the rendered HTML element dynamically at runtime.

 Show code

 Dynamic HTML Tag

 Change Tag 

 This renders a h1 tag

 Dynamic Content

 Toggle Tag 

 Current tag: paragraph

 Dynamic Attributes

 Toggle Link 

 External Link 

 Current Tag: h1

 Is Paragraph: True

 Link URL: https://example.com

 Link Target: _blank

 Element Reference

 Bind an ElementReference to interact with the rendered element programmatically.

 Show code

 Focus Input

 Click to Focus Input

 Multiple References

 Focus First

 Focus Second

 Note: Element references allow you to interact with DOM elements programmatically.

 Readonly & Disabled

 Control interaction states with Readonly and Disabled parameters.

 Show code

 Button States

 Normal Button (0)

 Normal state 

 Disabled Button (0)

 Disabled state 

 Readonly Button (0)

 Readonly state 

 Input States

 Normal state 

 Disabled state 

 Readonly state 

 Normal Clicks: 0

 Disabled Clicks: 0 (should not increment)

 Readonly Clicks: 0 (may increment - readonly doesn't prevent clicks)

 ✕

 Contents
