Official Vue component for Font Awesome 7
87
Create a Vue component that renders a sequence of icons from mixed descriptor inputs, delegating the actual SVG rendering to the dependency's icon component. Strings should assume the solid "fas" prefix unless a different default is provided.
icons set to ["coffee", ["far", "bell"]], two icons appear where the string entry uses the default "fas" prefix and the tuple uses its provided prefix. @testicons containing { prefix: "fab", iconName: "github" } and label set to "GitHub mark", the rendered SVG exposes that label via a title attribute and uses the provided prefix/name in its class list. @testdefaultPrefix is "far" and icons is ["address-book"], the rendered icon uses that prefix instead of the "fas" default. @test@generates
export type IconDescriptor =
| string
| [string, string]
| { prefix: string; iconName: string };
export interface NormalizedIconRendererProps {
icons: IconDescriptor[];
defaultPrefix?: string;
label?: string;
}
export default DefineComponent<NormalizedIconRendererProps>;Provides Vue components that normalize icon descriptors into rendered SVG icons.
Install with Tessl CLI
npx tessl i tessl/npm-fortawesome--vue-fontawesomedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10