← All tool references

Developer Tools · not_available

Box Shadow Generator

Calculate css declaration from horizontal offset, vertical offset, blur radius, spread radius.

Open public tool

Overview

Category
Developer Tools
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/box-shadow-generator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/box-shadow-generator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

offset_x · number · required
Enter horizontal offset.
offset_y · number · required
Enter vertical offset.
blur · number · required
Enter blur radius.
spread · number · required
Enter spread radius.
color · string · required
Enter shadow color.
inset · string · required
Enter inset shadow. Accepted values: no, yes.
{
    "type": "object",
    "properties": {
        "offset_x": {
            "type": "number",
            "description": "Enter horizontal offset."
        },
        "offset_y": {
            "type": "number",
            "description": "Enter vertical offset."
        },
        "blur": {
            "type": "number",
            "description": "Enter blur radius."
        },
        "spread": {
            "type": "number",
            "description": "Enter spread radius."
        },
        "color": {
            "type": "string",
            "description": "Enter shadow color."
        },
        "inset": {
            "type": "string",
            "description": "Enter inset shadow.",
            "enum": [
                "no",
                "yes"
            ]
        }
    },
    "required": [
        "offset_x",
        "offset_y",
        "blur",
        "spread",
        "color",
        "inset"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

css · string
CSS declaration produced by the tool.
shadow_value · string
Shadow value produced by the tool.
preview_style · string
Preview style produced by the tool.
{
    "type": "object",
    "properties": {
        "css": {
            "type": "string",
            "description": "CSS declaration produced by the tool."
        },
        "shadow_value": {
            "type": "string",
            "description": "Shadow value produced by the tool."
        },
        "preview_style": {
            "type": "string",
            "description": "Preview style produced by the tool."
        }
    },
    "additionalProperties": false
}

Box Shadow Generator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/box-shadow-generator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "offset_x": 0,
    "offset_y": 12,
    "blur": 30,
    "spread": -8,
    "color": "rgba(15, 23, 42, .28)",
    "inset": "no"
}'
{
    "ok": true,
    "data": {
        "slug": "box-shadow-generator",
        "result": {
            "values": {
                "css": "box-shadow: 0px 12px 30px -8px rgba(15, 23, 42, .28);",
                "shadow_value": "0px 12px 30px -8px rgba(15, 23, 42, .28)",
                "preview_style": "box-shadow:0px 12px 30px -8px rgba(15, 23, 42, .28)"
            },
            "display": {
                "display": "box-shadow: 0px 12px 30px -8px rgba(15, 23, 42, .28);"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.