Skip to content
Logo LogoDuck documentation
Go Home
โŒ˜ K
Logo LogoDuck documentation
Go Home

Table of Contents:

  • ๐Ÿš€ Getting Started
  • ๐ŸŒŸ Running the Server
  • ๐ŸŒ€ Project structure
  • ๐Ÿ—ƒ Cached Views
  • ๐Ÿ›  Settings Configuration
  • ๐Ÿ–ฅ๏ธ Lively Component System
  • ๐Ÿ“Ÿ Simple Counter App
  • ๐ŸŒ€ Component Caching Utilities
  • Static Component Utilities
  • ๐Ÿ“‘ Templates
  • ๐Ÿท๏ธ Template Tags & Filters
  • ๐Ÿ“˜ Blueprints
  • โ›ด๏ธ Micro Applications
  • โณ Duck Automations
  • ๐Ÿšง HTTP/2 and HTTPS
  • ๐Ÿ–ฅ๏ธ Web Server Gateway (WSGI)
  • โšก Asynchronous Server Gateway (ASGI)
  • ๐ŸŒ WebSockets Implementation
  • ๐Ÿ”‹Background Thread & Asyncio Loop Managers
  • ๐Ÿ”€ Request & Response
  • ๐Ÿ” Sessions in Duck
  • ๐Ÿ›ก๏ธ Duck Middlewares
  • ๐Ÿ“ Duck Logging System
  • ๐Ÿ—„๏ธ๏ธ Database
  • ๐Ÿค Django Integration with Duck
  • ๐Ÿ“„ Sitemap
  • ๐Ÿš€ Deployment Guide
  • ๐Ÿ“Š Duck System Monitor
  • ๐ŸŒ Duck Service Management
  • ๐Ÿ” Free SSL Certificate
  • ๐Ÿ”Œ Socket I/O (xsocket)
  • ๐Ÿ’กDuck Shortcuts
  • โŒ› Duck Utilities

API Documentation:

  • API Reference
    • duck
Duck documentation
/
API Reference
/
duck
/
duck.html
/
duck.html.components
/
duck.html.components.link

duck.html.components.linkยถ

Link component module.

Module Contentsยถ

Classesยถ

Link

Link component.

APIยถ

class duck.html.components.link.Link(url: str = None, *args, **kwargs)[source]ยถ

Bases: duck.html.components.InnerComponent

Link component.

Parameters:
  • url โ€“ The linkโ€™s URL.

  • text โ€“ Text for the link.

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.

get_element()[source]ยถ
on_create()[source]ยถ
duck.html.components.label
duck.html.components.lively

On this page

  • Module Contents
    • Classes
    • API
      • Link
        • Link.get_element()
        • Link.on_create()

ยฉ 2026, Duck Frameworkย Built with Sphinx 8.2.3