duck.etc.blueprints.welcome.ui.components.hero¶
HeroSection component — the opening hero block of the welcome page.
Renders the animated heading with gradient accent text, a typed tagline, the pip install command card, and the primary CTA buttons.
Module Contents¶
Classes¶
Full hero block shown at the top of the welcome page. |
API¶
- class duck.etc.blueprints.welcome.ui.components.hero.HeroSection(element: Optional[str] = None, properties: Optional[Dict[str, str]] = None, props: Optional[Dict[str, str]] = None, style: Optional[Dict[str, str]] = None, inner_html: Optional[Union[str, str, float]] = None, children: Optional[List[duck.html.components.HtmlComponent]] = None, **kwargs)[source]¶
Bases:
duck.html.components.InnerComponentFull hero block shown at the top of the welcome page.
Contains the version pill, animated heading, tagline with typing cursor, install command copy card, and CTA buttons.
Initialization
Initialize an HTML component.
- Parameters:
element – The HTML element tag name (e.g., textarea, input, button). Can be None, but make sure element is returned by get_element method.
accept_inner_html – Whether the HTML component accepts an inner body (e.g., inner-body-here).
inner_html – Inner html to add to the HTML component. Defaults to None.
properties – Dictionary for properties to initialize the component with.
props – Just same as properties argument (added for simplicity).
style – Dictionary for style to initialize the component with.
**kwargs – Extra keyword arguments
- Raises:
HtmlComponentError – If ‘element’ is not a string or ‘inner_html’ is set but ‘accept_inner_html’ is False.
- build_cta_row() duck.html.components.container.Container[source]¶
Returns the row of primary and secondary CTA buttons.
When the project has a registered dashboard, the primary button links there instead of to the external docs.
- Returns:
A Container with both buttons.
- build_heading() duck.html.components.container.Container[source]¶
Returns the primary hero heading with a shimmer gradient accent.
- Returns:
A Container wrapping the h1 heading element.
- build_install_card() duck.html.components.container.Container[source]¶
Returns the pip install command card with clipboard copy on click.
- Returns:
A Container styled as the install card.
- build_tagline() duck.html.components.container.Container[source]¶
Returns the typed tagline paragraph with blinking cursor.
- Returns:
A Container with the tagline and cursor markup.
- build_version_pill() duck.html.components.container.Container[source]¶
Returns the animated orange version/status pill above the heading.
- Returns:
A Container with the pill markup.