Get one style snippet
card_builder_get_style_snippetRetrieve a single built-in style snippet wrapped in its target and container envelope, ready to assign directly to a block's styles. Skips manual style composition and Home Assistant calls.
Instructions
Fetch one built-in style snippet wrapped in the full target/container envelope.
Looks up name in STYLE_SNIPPETS and wraps it as
{target: {containers: {container: <snippet>}}}; makes no call to
Home Assistant.
Use when: assigning exactly one snippet to a block's styles without
composing several via card_builder_build_styles.
Returns: {<target>: {containers: {<container>: <snippet>}}} — ready
to assign to a block's styles directly.
Errors: {"error": "unknown_snippet", "name": ..., "known": [...]}
when name isn't a known snippet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Snippet name, e.g. 'card_padded', from card_builder_list_style_snippets. | |
| target | No | Style target key to wrap the snippet under, e.g. 'block' or 'state'. Defaults to 'block'. | block |
| container | No | Responsive container to wrap the snippet under: 'desktop', 'tablet', or 'mobile'. Defaults to 'desktop'. | desktop |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||