Download the PHP package ui-awesome/html-svg without Composer

On this page you can find all versions of the php package ui-awesome/html-svg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package html-svg

UI Awesome HTML SVG Tag for PHP.


PHPUnit Codecov Infection Psalm Psalm Coverage Style ci

The svg element is a container that defines a new coordinate system and viewport.

It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Instantiate the Svg class using Svg::widget().

Setting Attributes

Use the provided methods to set specific attributes for the a element.

Or, use the attributes method to set multiple attributes at once.

Adding Content

If you want to include content within the svg tag, use the content method.

Rendering

Generate the HTML output using the render method, for simple instantiation.

Or, use the magic __toString method.

Common Use Cases

Below are examples of common use cases:

Explore additional methods for setting various attributes such as fill, heigth, lang, name, style, title, viewbox, width, xmlns, etc.

Attributes

Refer to the Attribute Tests for comprehensive examples.

The following methods are available for setting attributes:

Method Description
attributes() Set multiple attributes at once.
class() Set the class attribute.
content() Set the content within the svg element.
fill() Set the fill attribute.
height() Set the height attribute.
id() Set the id attribute.
lang() Set the lang attribute.
name() Set the name attribute.
stroke() Set the stroke attribute.
style() Set the style attribute.
title() Set the title attribute.
viewBox() Set the viewBox attribute.
width() Set the width attribute.
xmlns() Set the xmlns attribute.

Custom methods

Refer to the Custom Methods Tests for comprehensive examples.

The following methods are available for customizing the HTML output:

Method Description
filePath() Set the file path for the HTML output.
render() Generates the HTML output.
widget() Instantiates the Svg::class.

Testing

Check the documentation testing to learn about testing.

Support versions

PHP81

License

The MIT License (MIT). Please see License File for more information.

Our social networks

Twitter


All versions of html-svg with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-dom Version *
ext-libxml Version *
enshrined/svg-sanitize Version ^0.18
php-forge/awesome-widget Version ^0.1
ui-awesome/html-attribute Version ^0.2
ui-awesome/html-concern Version ^0.2
ui-awesome/html-core Version ^0.1
ui-awesome/html-interop Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ui-awesome/html-svg contains the following files

Loading the files please wait ....